aboutsummaryrefslogtreecommitdiff
path: root/pkg/bindings
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-06-09 20:45:51 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2020-06-10 05:49:41 -0400
commit87718c4e676dc503f67ca6f283c4242cf19f9eb7 (patch)
treefab6dcb9e6c497cb1155b864bcc2085550d23969 /pkg/bindings
parent4bb43b898d72cb938d317055e4ade2771cfc9c54 (diff)
downloadpodman-87718c4e676dc503f67ca6f283c4242cf19f9eb7.tar.gz
podman-87718c4e676dc503f67ca6f283c4242cf19f9eb7.tar.bz2
podman-87718c4e676dc503f67ca6f283c4242cf19f9eb7.zip
Fix Id->ID where possible for lint
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'pkg/bindings')
-rw-r--r--pkg/bindings/containers/attach.go16
-rw-r--r--pkg/bindings/containers/checkpoint.go12
-rw-r--r--pkg/bindings/containers/commit.go6
-rw-r--r--pkg/bindings/containers/diff.go4
-rw-r--r--pkg/bindings/images/diff.go4
-rw-r--r--pkg/bindings/images/images.go4
6 files changed, 23 insertions, 23 deletions
diff --git a/pkg/bindings/containers/attach.go b/pkg/bindings/containers/attach.go
index b7f35c30d..44c7f4002 100644
--- a/pkg/bindings/containers/attach.go
+++ b/pkg/bindings/containers/attach.go
@@ -25,7 +25,7 @@ import (
)
// Attach attaches to a running container
-func Attach(ctx context.Context, nameOrId string, detachKeys *string, logs, stream *bool, stdin io.Reader, stdout io.Writer, stderr io.Writer, attachReady chan bool) error {
+func Attach(ctx context.Context, nameOrID string, detachKeys *string, logs, stream *bool, stdin io.Reader, stdout io.Writer, stderr io.Writer, attachReady chan bool) error {
isSet := struct {
stdin bool
stdout bool
@@ -52,7 +52,7 @@ func Attach(ctx context.Context, nameOrId string, detachKeys *string, logs, stre
}
// Do we need to wire in stdin?
- ctnr, err := Inspect(ctx, nameOrId, bindings.PFalse)
+ ctnr, err := Inspect(ctx, nameOrID, bindings.PFalse)
if err != nil {
return err
}
@@ -115,7 +115,7 @@ func Attach(ctx context.Context, nameOrId string, detachKeys *string, logs, stre
IdleConnTimeout: time.Duration(0),
}
conn.Client.Transport = t
- response, err := conn.DoRequest(nil, http.MethodPost, "/containers/%s/attach", params, headers, nameOrId)
+ response, err := conn.DoRequest(nil, http.MethodPost, "/containers/%s/attach", params, headers, nameOrID)
if err != nil {
return err
}
@@ -129,7 +129,7 @@ func Attach(ctx context.Context, nameOrId string, detachKeys *string, logs, stre
winCtx, winCancel := context.WithCancel(ctx)
defer winCancel()
- go attachHandleResize(ctx, winCtx, winChange, false, nameOrId, file)
+ go attachHandleResize(ctx, winCtx, winChange, false, nameOrID, file)
}
// If we are attaching around a start, we need to "signal"
@@ -243,13 +243,13 @@ func DemuxFrame(r io.Reader, buffer []byte, length int) (frame []byte, err error
}
// ResizeContainerTTY sets container's TTY height and width in characters
-func ResizeContainerTTY(ctx context.Context, nameOrId string, height *int, width *int) error {
- return resizeTTY(ctx, bindings.JoinURL("containers", nameOrId, "resize"), height, width)
+func ResizeContainerTTY(ctx context.Context, nameOrID string, height *int, width *int) error {
+ return resizeTTY(ctx, bindings.JoinURL("containers", nameOrID, "resize"), height, width)
}
// ResizeExecTTY sets session's TTY height and width in characters
-func ResizeExecTTY(ctx context.Context, nameOrId string, height *int, width *int) error {
- return resizeTTY(ctx, bindings.JoinURL("exec", nameOrId, "resize"), height, width)
+func ResizeExecTTY(ctx context.Context, nameOrID string, height *int, width *int) error {
+ return resizeTTY(ctx, bindings.JoinURL("exec", nameOrID, "resize"), height, width)
}
// resizeTTY set size of TTY of container
diff --git a/pkg/bindings/containers/checkpoint.go b/pkg/bindings/containers/checkpoint.go
index f483a9297..916ec8071 100644
--- a/pkg/bindings/containers/checkpoint.go
+++ b/pkg/bindings/containers/checkpoint.go
@@ -10,9 +10,9 @@ import (
"github.com/containers/libpod/pkg/domain/entities"
)
-// Checkpoint checkpoints the given container (identified by nameOrId). All additional
+// Checkpoint checkpoints the given container (identified by nameOrID). All additional
// options are options and allow for more fine grained control of the checkpoint process.
-func Checkpoint(ctx context.Context, nameOrId string, keep, leaveRunning, tcpEstablished, ignoreRootFS *bool, export *string) (*entities.CheckpointReport, error) {
+func Checkpoint(ctx context.Context, nameOrID string, keep, leaveRunning, tcpEstablished, ignoreRootFS *bool, export *string) (*entities.CheckpointReport, error) {
var report entities.CheckpointReport
conn, err := bindings.GetClient(ctx)
if err != nil {
@@ -34,16 +34,16 @@ func Checkpoint(ctx context.Context, nameOrId string, keep, leaveRunning, tcpEst
if export != nil {
params.Set("export", *export)
}
- response, err := conn.DoRequest(nil, http.MethodPost, "/containers/%s/checkpoint", params, nil, nameOrId)
+ response, err := conn.DoRequest(nil, http.MethodPost, "/containers/%s/checkpoint", params, nil, nameOrID)
if err != nil {
return nil, err
}
return &report, response.Process(&report)
}
-// Restore restores a checkpointed container to running. The container is identified by the nameOrId option. All
+// Restore restores a checkpointed container to running. The container is identified by the nameOrID option. All
// additional options are optional and allow finer control of the restore processs.
-func Restore(ctx context.Context, nameOrId string, keep, tcpEstablished, ignoreRootFS, ignoreStaticIP, ignoreStaticMAC *bool, name, importArchive *string) (*entities.RestoreReport, error) {
+func Restore(ctx context.Context, nameOrID string, keep, tcpEstablished, ignoreRootFS, ignoreStaticIP, ignoreStaticMAC *bool, name, importArchive *string) (*entities.RestoreReport, error) {
var report entities.RestoreReport
conn, err := bindings.GetClient(ctx)
if err != nil {
@@ -71,7 +71,7 @@ func Restore(ctx context.Context, nameOrId string, keep, tcpEstablished, ignoreR
if importArchive != nil {
params.Set("import", *importArchive)
}
- response, err := conn.DoRequest(nil, http.MethodPost, "/containers/%s/restore", params, nil, nameOrId)
+ response, err := conn.DoRequest(nil, http.MethodPost, "/containers/%s/restore", params, nil, nameOrID)
if err != nil {
return nil, err
}
diff --git a/pkg/bindings/containers/commit.go b/pkg/bindings/containers/commit.go
index 780d42272..1a9ddc970 100644
--- a/pkg/bindings/containers/commit.go
+++ b/pkg/bindings/containers/commit.go
@@ -10,16 +10,16 @@ import (
"github.com/containers/libpod/pkg/bindings"
)
-// Commit creates a container image from a container. The container is defined by nameOrId. Use
+// Commit creates a container image from a container. The container is defined by nameOrID. Use
// the CommitOptions for finer grain control on characteristics of the resulting image.
-func Commit(ctx context.Context, nameOrId string, options CommitOptions) (handlers.IDResponse, error) {
+func Commit(ctx context.Context, nameOrID string, options CommitOptions) (handlers.IDResponse, error) {
id := handlers.IDResponse{}
conn, err := bindings.GetClient(ctx)
if err != nil {
return id, err
}
params := url.Values{}
- params.Set("container", nameOrId)
+ params.Set("container", nameOrID)
if options.Author != nil {
params.Set("author", *options.Author)
}
diff --git a/pkg/bindings/containers/diff.go b/pkg/bindings/containers/diff.go
index 06a828c30..e7a50248a 100644
--- a/pkg/bindings/containers/diff.go
+++ b/pkg/bindings/containers/diff.go
@@ -9,13 +9,13 @@ import (
)
// Diff provides the changes between two container layers
-func Diff(ctx context.Context, nameOrId string) ([]archive.Change, error) {
+func Diff(ctx context.Context, nameOrID string) ([]archive.Change, error) {
conn, err := bindings.GetClient(ctx)
if err != nil {
return nil, err
}
- response, err := conn.DoRequest(nil, http.MethodGet, "/containers/%s/changes", nil, nil, nameOrId)
+ response, err := conn.DoRequest(nil, http.MethodGet, "/containers/%s/changes", nil, nil, nameOrID)
if err != nil {
return nil, err
}
diff --git a/pkg/bindings/images/diff.go b/pkg/bindings/images/diff.go
index e2d344ea0..25cbde188 100644
--- a/pkg/bindings/images/diff.go
+++ b/pkg/bindings/images/diff.go
@@ -9,13 +9,13 @@ import (
)
// Diff provides the changes between two container layers
-func Diff(ctx context.Context, nameOrId string) ([]archive.Change, error) {
+func Diff(ctx context.Context, nameOrID string) ([]archive.Change, error) {
conn, err := bindings.GetClient(ctx)
if err != nil {
return nil, err
}
- response, err := conn.DoRequest(nil, http.MethodGet, "/images/%s/changes", nil, nil, nameOrId)
+ response, err := conn.DoRequest(nil, http.MethodGet, "/images/%s/changes", nil, nil, nameOrID)
if err != nil {
return nil, err
}
diff --git a/pkg/bindings/images/images.go b/pkg/bindings/images/images.go
index e0802a6e1..a82a9080b 100644
--- a/pkg/bindings/images/images.go
+++ b/pkg/bindings/images/images.go
@@ -80,7 +80,7 @@ func GetImage(ctx context.Context, nameOrID string, size *bool) (*entities.Image
}
// Tree retrieves a "tree" based representation of the given image
-func Tree(ctx context.Context, nameOrId string, whatRequires *bool) (*entities.ImageTreeReport, error) {
+func Tree(ctx context.Context, nameOrID string, whatRequires *bool) (*entities.ImageTreeReport, error) {
var report entities.ImageTreeReport
conn, err := bindings.GetClient(ctx)
if err != nil {
@@ -90,7 +90,7 @@ func Tree(ctx context.Context, nameOrId string, whatRequires *bool) (*entities.I
if whatRequires != nil {
params.Set("size", strconv.FormatBool(*whatRequires))
}
- response, err := conn.DoRequest(nil, http.MethodGet, "/images/%s/tree", params, nil, nameOrId)
+ response, err := conn.DoRequest(nil, http.MethodGet, "/images/%s/tree", params, nil, nameOrID)
if err != nil {
return nil, err
}