diff --git a/cmd/runmqserver/mqconfig.go b/cmd/runmqserver/mqconfig.go index b397502..a1a2d55 100644 --- a/cmd/runmqserver/mqconfig.go +++ b/cmd/runmqserver/mqconfig.go @@ -16,7 +16,6 @@ limitations under the License. package main import ( - "errors" "fmt" "io/ioutil" "os/user" @@ -121,7 +120,7 @@ func logConfig() error { return err } } else { - return errors.New(fmt.Sprintf("Unsupported platform: %v", runtime.GOOS)) + return fmt.Errorf("Unsupported platform: %v", runtime.GOOS) } return nil } diff --git a/cmd/runmqserver/mqconfig_linux.go b/cmd/runmqserver/mqconfig_linux.go index 1ed02a9..d0ec357 100644 --- a/cmd/runmqserver/mqconfig_linux.go +++ b/cmd/runmqserver/mqconfig_linux.go @@ -18,7 +18,6 @@ limitations under the License. package main import ( - "errors" "fmt" "golang.org/x/sys/unix" ) @@ -45,7 +44,7 @@ func checkFS(path string) error { t := fsTypes[statfs.Type] switch t { case "aufs", "overlayfs", "tmpfs": - return errors.New(fmt.Sprintf("Error: %v uses unsupported filesystem type %v", path, t)) + return fmt.Errorf("%v uses unsupported filesystem type: %v", path, t) default: log.Printf("Detected %v has filesystem type '%v'", path, t) return nil