diff options
author | Paul Holzinger <paul.holzinger@web.de> | 2021-02-11 14:15:26 +0100 |
---|---|---|
committer | Paul Holzinger <paul.holzinger@web.de> | 2021-02-11 23:01:29 +0100 |
commit | ef2fc90f2d0057bfddee1b83d307e853181a4988 (patch) | |
tree | d1a8f350ff32068ea017e7a5c5384c8a184a8fb5 /pkg/bindings | |
parent | afe4ce6b1ce6a5ba21472f51defd243bdd7750b3 (diff) | |
download | podman-ef2fc90f2d0057bfddee1b83d307e853181a4988.tar.gz podman-ef2fc90f2d0057bfddee1b83d307e853181a4988.tar.bz2 podman-ef2fc90f2d0057bfddee1b83d307e853181a4988.zip |
Enable stylecheck linter
Use the stylecheck linter and fix the reported problems.
[NO TESTS NEEDED]
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
Diffstat (limited to 'pkg/bindings')
-rw-r--r-- | pkg/bindings/containers/containers.go | 4 | ||||
-rw-r--r-- | pkg/bindings/errors.go | 6 | ||||
-rw-r--r-- | pkg/bindings/network/network.go | 8 |
3 files changed, 9 insertions, 9 deletions
diff --git a/pkg/bindings/containers/containers.go b/pkg/bindings/containers/containers.go index 8e644b712..0a180c73d 100644 --- a/pkg/bindings/containers/containers.go +++ b/pkg/bindings/containers/containers.go @@ -270,8 +270,8 @@ func Top(ctx context.Context, nameOrID string, options *TopOptions) ([]string, e } params := url.Values{} if options.Changed("Descriptors") { - ps_args := strings.Join(options.GetDescriptors(), ",") - params.Add("ps_args", ps_args) + psArgs := strings.Join(options.GetDescriptors(), ",") + params.Add("ps_args", psArgs) } response, err := conn.DoRequest(nil, http.MethodGet, "/containers/%s/top", params, nil, nameOrID) if err != nil { diff --git a/pkg/bindings/errors.go b/pkg/bindings/errors.go index e75ce898d..51ea487be 100644 --- a/pkg/bindings/errors.go +++ b/pkg/bindings/errors.go @@ -20,12 +20,12 @@ func handleError(data []byte) error { return e } -func (a APIResponse) Process(unmarshalInto interface{}) error { - data, err := ioutil.ReadAll(a.Response.Body) +func (h APIResponse) Process(unmarshalInto interface{}) error { + data, err := ioutil.ReadAll(h.Response.Body) if err != nil { return errors.Wrap(err, "unable to process API response") } - if a.IsSuccess() || a.IsRedirection() { + if h.IsSuccess() || h.IsRedirection() { if unmarshalInto != nil { return json.Unmarshal(data, unmarshalInto) } diff --git a/pkg/bindings/network/network.go b/pkg/bindings/network/network.go index 428e60cf2..8fdb28425 100644 --- a/pkg/bindings/network/network.go +++ b/pkg/bindings/network/network.go @@ -102,7 +102,7 @@ func List(ctx context.Context, options *ListOptions) ([]*entities.NetworkListRep } // Disconnect removes a container from a given network -func Disconnect(ctx context.Context, networkName string, ContainerNameOrId string, options *DisconnectOptions) error { +func Disconnect(ctx context.Context, networkName string, ContainerNameOrID string, options *DisconnectOptions) error { if options == nil { options = new(DisconnectOptions) } @@ -117,7 +117,7 @@ func Disconnect(ctx context.Context, networkName string, ContainerNameOrId strin Container string Force bool }{ - Container: ContainerNameOrId, + Container: ContainerNameOrID, } if force := options.GetForce(); options.Changed("Force") { disconnect.Force = force @@ -136,7 +136,7 @@ func Disconnect(ctx context.Context, networkName string, ContainerNameOrId strin } // Connect adds a container to a network -func Connect(ctx context.Context, networkName string, ContainerNameOrId string, options *ConnectOptions) error { +func Connect(ctx context.Context, networkName string, ContainerNameOrID string, options *ConnectOptions) error { if options == nil { options = new(ConnectOptions) } @@ -151,7 +151,7 @@ func Connect(ctx context.Context, networkName string, ContainerNameOrId string, Container string Aliases []string }{ - Container: ContainerNameOrId, + Container: ContainerNameOrID, } if aliases := options.GetAliases(); options.Changed("Aliases") { connect.Aliases = aliases |