From 6948ab4fa187e0fec2455e51073a92b932818617 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sun, 13 Oct 2019 15:42:01 +0200 Subject: [PATCH] api/types: hostconfig: fix LogMode enum Signed-off-by: Sebastiaan van Stijn --- api/types/container/host_config.go | 2 +- daemon/logger/loggerutils/cache/local_cache.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/types/container/host_config.go b/api/types/container/host_config.go index 77195bf2ed..dcea6c8a5a 100644 --- a/api/types/container/host_config.go +++ b/api/types/container/host_config.go @@ -341,7 +341,7 @@ type LogMode string // Available logging modes const ( - LogModeUnset = "" + LogModeUnset LogMode = "" LogModeBlocking LogMode = "blocking" LogModeNonBlock LogMode = "non-blocking" ) diff --git a/daemon/logger/loggerutils/cache/local_cache.go b/daemon/logger/loggerutils/cache/local_cache.go index 1ca19eb5db..c5e8fc2cac 100644 --- a/daemon/logger/loggerutils/cache/local_cache.go +++ b/daemon/logger/loggerutils/cache/local_cache.go @@ -36,7 +36,7 @@ func WithLocalCache(l logger.Logger, info logger.Info) (logger.Logger, error) { return nil, errors.Wrap(err, "error initializing local log cache driver") } - if info.Config["mode"] == container.LogModeUnset || container.LogMode(info.Config["mode"]) == container.LogModeNonBlock { + if container.LogMode(info.Config["mode"]) == container.LogModeUnset || container.LogMode(info.Config["mode"]) == container.LogModeNonBlock { var size int64 = -1 if s, exists := info.Config["max-buffer-size"]; exists { size, err = units.RAMInBytes(s)