From d4deda6193f82cd0f90b1c43fe935ed4e805b777 Mon Sep 17 00:00:00 2001 From: francisco souza <108725+fsouza@users.noreply.github.com> Date: Sun, 14 Aug 2022 09:34:20 -0400 Subject: [PATCH] Fix lint violations --- container_restart.go | 4 ++-- misc.go | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/container_restart.go b/container_restart.go index 183cbac0..64bb1a09 100644 --- a/container_restart.go +++ b/container_restart.go @@ -12,9 +12,9 @@ import ( // // - always: the docker daemon will always restart the container // - on-failure: the docker daemon will restart the container on failures, at -// most MaximumRetryCount times +// most MaximumRetryCount times // - unless-stopped: the docker daemon will always restart the container except -// when user has manually stopped the container +// when user has manually stopped the container // - no: the docker daemon will not restart the container automatically type RestartPolicy struct { Name string `json:"Name,omitempty" yaml:"Name,omitempty" toml:"Name,omitempty"` diff --git a/misc.go b/misc.go index 8eaa8270..2fa19c67 100644 --- a/misc.go +++ b/misc.go @@ -131,13 +131,11 @@ type ServiceConfig struct { type NetIPNet net.IPNet // MarshalJSON returns the JSON representation of the IPNet. -// func (ipnet *NetIPNet) MarshalJSON() ([]byte, error) { return json.Marshal((*net.IPNet)(ipnet).String()) } // UnmarshalJSON sets the IPNet from a byte array of JSON. -// func (ipnet *NetIPNet) UnmarshalJSON(b []byte) (err error) { var ipnetStr string if err = json.Unmarshal(b, &ipnetStr); err == nil { @@ -181,9 +179,9 @@ func (c *Client) Info() (*DockerInfo, error) { // // Some examples: // -// localhost.localdomain:5000/samalba/hipache:latest -> localhost.localdomain:5000/samalba/hipache, latest -// localhost.localdomain:5000/samalba/hipache -> localhost.localdomain:5000/samalba/hipache, "" -// busybox:latest@sha256:4a731fb46adc5cefe3ae374a8b6020fc1b6ad667a279647766e9a3cd89f6fa92 -> busybox, latest +// localhost.localdomain:5000/samalba/hipache:latest -> localhost.localdomain:5000/samalba/hipache, latest +// localhost.localdomain:5000/samalba/hipache -> localhost.localdomain:5000/samalba/hipache, "" +// busybox:latest@sha256:4a731fb46adc5cefe3ae374a8b6020fc1b6ad667a279647766e9a3cd89f6fa92 -> busybox, latest func ParseRepositoryTag(repoTag string) (repository string, tag string) { parts := strings.SplitN(repoTag, "@", 2) repoTag = parts[0]