diff --git a/daemon/daemon_unix.go b/daemon/daemon_unix.go index b99b04e90e..4c758ce1b1 100644 --- a/daemon/daemon_unix.go +++ b/daemon/daemon_unix.go @@ -502,7 +502,7 @@ func verifyPlatformContainerResources(resources *containertypes.Resources, sysIn return warnings, errors.New("CPU cfs quota can not be less than 1ms (i.e. 1000)") } if resources.CPUPercent > 0 { - warnings = append(warnings, fmt.Sprintf("%s does not support CPU percent. Percent discarded.", runtime.GOOS)) + warnings = append(warnings, runtime.GOOS+" does not support CPU percent. Percent discarded.") resources.CPUPercent = 0 } diff --git a/daemon/hosts.go b/daemon/hosts.go index 6b2a0fe702..f01c71b045 100644 --- a/daemon/hosts.go +++ b/daemon/hosts.go @@ -4,7 +4,6 @@ import ( "context" "crypto/tls" "crypto/x509" - "fmt" "net/http" "net/url" "os" @@ -90,7 +89,7 @@ func mirrorsToRegistryHosts(mirrors []string, dHost docker.RegistryHost) []docke u, err := url.Parse(mirror) if err != nil || u.Host == "" { - u, err = url.Parse(fmt.Sprintf("dummy://%s", mirror)) + u, err = url.Parse("dummy://" + mirror) } if err == nil && u.Host != "" { h.Host = u.Host diff --git a/daemon/mounts.go b/daemon/mounts.go index b08eb2bca9..f6bf1d138d 100644 --- a/daemon/mounts.go +++ b/daemon/mounts.go @@ -89,7 +89,7 @@ func (daemon *Daemon) removeMountPoints(container *container.Container, rm bool) continue } } else { - rmErrors = append(rmErrors, fmt.Sprintf("layer not found for image %s", m.Name)) + rmErrors = append(rmErrors, "layer not found for image "+m.Name) } } }