diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2020-06-09 16:47:30 -0400 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2020-06-10 05:49:41 -0400 |
commit | 4bb43b898d72cb938d317055e4ade2771cfc9c54 (patch) | |
tree | 4d3f87d922da20d575615cdd50f19b61d9fa4bc1 /pkg/bindings | |
parent | fbe09d78e91c9ac5cadc8b00a67c7d7f89d64868 (diff) | |
download | podman-4bb43b898d72cb938d317055e4ade2771cfc9c54.tar.gz podman-4bb43b898d72cb938d317055e4ade2771cfc9c54.tar.bz2 podman-4bb43b898d72cb938d317055e4ade2771cfc9c54.zip |
Fixup issues found by golint
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'pkg/bindings')
-rw-r--r-- | pkg/bindings/bindings.go | 3 | ||||
-rw-r--r-- | pkg/bindings/connection.go | 8 | ||||
-rw-r--r-- | pkg/bindings/generate/generate.go | 2 | ||||
-rw-r--r-- | pkg/bindings/play/play.go | 2 |
4 files changed, 7 insertions, 8 deletions
diff --git a/pkg/bindings/bindings.go b/pkg/bindings/bindings.go index da47ea713..94f7a45d0 100644 --- a/pkg/bindings/bindings.go +++ b/pkg/bindings/bindings.go @@ -5,7 +5,6 @@ // This package exposes a series of methods that allow users to firstly // create their connection with the API endpoints. Once the connection // is established, users can then manage the Podman container runtime. - package bindings import ( @@ -28,7 +27,7 @@ var ( pFalse = false PFalse = &pFalse - // _*YES*- podman will fail to run if this value is wrong + // APIVersion - podman will fail to run if this value is wrong APIVersion = semver.MustParse("1.0.0") ) diff --git a/pkg/bindings/connection.go b/pkg/bindings/connection.go index b130b9598..aa7f3707c 100644 --- a/pkg/bindings/connection.go +++ b/pkg/bindings/connection.go @@ -41,7 +41,7 @@ type APIResponse struct { } type Connection struct { - Uri *url.URL + URI *url.URL Client *http.Client } @@ -137,7 +137,7 @@ func NewConnectionWithIdentity(ctx context.Context, uri string, passPhrase strin func tcpClient(_url *url.URL) (Connection, error) { connection := Connection{ - Uri: _url, + URI: _url, } connection.Client = &http.Client{ Transport: &http.Transport{ @@ -246,7 +246,7 @@ func sshClient(_url *url.URL, secure bool, passPhrase string, identities ...stri return Connection{}, errors.Wrapf(err, "Connection to bastion host (%s) failed.", _url.String()) } - connection := Connection{Uri: _url} + connection := Connection{URI: _url} connection.Client = &http.Client{ Transport: &http.Transport{ DialContext: func(ctx context.Context, _, _ string) (net.Conn, error) { @@ -257,7 +257,7 @@ func sshClient(_url *url.URL, secure bool, passPhrase string, identities ...stri } func unixClient(_url *url.URL) (Connection, error) { - connection := Connection{Uri: _url} + connection := Connection{URI: _url} connection.Client = &http.Client{ Transport: &http.Transport{ DialContext: func(ctx context.Context, _, _ string) (net.Conn, error) { diff --git a/pkg/bindings/generate/generate.go b/pkg/bindings/generate/generate.go index 161b722f3..5e4be4896 100644 --- a/pkg/bindings/generate/generate.go +++ b/pkg/bindings/generate/generate.go @@ -10,7 +10,7 @@ import ( "github.com/containers/libpod/pkg/domain/entities" ) -func GenerateKube(ctx context.Context, nameOrID string, options entities.GenerateKubeOptions) (*entities.GenerateKubeReport, error) { +func Kube(ctx context.Context, nameOrID string, options entities.GenerateKubeOptions) (*entities.GenerateKubeReport, error) { conn, err := bindings.GetClient(ctx) if err != nil { return nil, err diff --git a/pkg/bindings/play/play.go b/pkg/bindings/play/play.go index 288cca454..9a4f56b6d 100644 --- a/pkg/bindings/play/play.go +++ b/pkg/bindings/play/play.go @@ -13,7 +13,7 @@ import ( "github.com/containers/libpod/pkg/domain/entities" ) -func PlayKube(ctx context.Context, path string, options entities.PlayKubeOptions) (*entities.PlayKubeReport, error) { +func Kube(ctx context.Context, path string, options entities.PlayKubeOptions) (*entities.PlayKubeReport, error) { var report entities.PlayKubeReport conn, err := bindings.GetClient(ctx) if err != nil { |