summaryrefslogtreecommitdiff
path: root/pkg/bindings
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/bindings')
-rw-r--r--pkg/bindings/containers/containers.go4
-rw-r--r--pkg/bindings/errors.go6
-rw-r--r--pkg/bindings/network/network.go8
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