From 2fb7c9fea7b3987644c57473aeba70f07f7df0eb Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 31 May 2021 11:48:30 +0200 Subject: [PATCH] daemon/config: error strings should not be capitalized daemon/config/config_unix.go:92:21: error-strings: error strings should not be capitalized or end with punctuation or a newline (revive) return fmt.Errorf("Default cgroup namespace mode (%v) is invalid. Use \"host\" or \"private\".", cm) // nolint: golint ^ Signed-off-by: Sebastiaan van Stijn (cherry picked from commit 16ced7622b29df51a5bb77a17332d825a414ccd0) Signed-off-by: Sebastiaan van Stijn --- daemon/config/config_unix.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/daemon/config/config_unix.go b/daemon/config/config_unix.go index 5adee7e8e3..96805d3d56 100644 --- a/daemon/config/config_unix.go +++ b/daemon/config/config_unix.go @@ -75,14 +75,14 @@ func (conf *Config) IsSwarmCompatible() error { } func verifyDefaultIpcMode(mode string) error { - const hint = "Use \"shareable\" or \"private\"." + const hint = `use "shareable" or "private"` dm := containertypes.IpcMode(mode) if !dm.Valid() { - return fmt.Errorf("Default IPC mode setting (%v) is invalid. "+hint, dm) + return fmt.Errorf("default IPC mode setting (%v) is invalid; "+hint, dm) } if dm != "" && !dm.IsPrivate() && !dm.IsShareable() { - return fmt.Errorf("IPC mode \"%v\" is not supported as default value. "+hint, dm) + return fmt.Errorf(`IPC mode "%v" is not supported as default value; `+hint, dm) } return nil } @@ -90,7 +90,7 @@ func verifyDefaultIpcMode(mode string) error { func verifyDefaultCgroupNsMode(mode string) error { cm := containertypes.CgroupnsMode(mode) if !cm.Valid() { - return fmt.Errorf("Default cgroup namespace mode (%v) is invalid. Use \"host\" or \"private\".", cm) //nolint: golint + return fmt.Errorf(`default cgroup namespace mode (%v) is invalid; use "host" or "private"`, cm) } return nil