forked from LaconicNetwork/kompose
Updated code with go lint result
Updated code with suggestion given by `go lint`
This commit is contained in:
@@ -28,12 +28,13 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Build will provide methods for interaction with API regarding building images
|
||||
type Build struct {
|
||||
Client dockerlib.Client
|
||||
}
|
||||
|
||||
/*
|
||||
Build a Docker image via the Docker API. Takes the source directory
|
||||
BuildImage builds a Docker image via the Docker API. Takes the source directory
|
||||
and image name and then builds the appropriate image. Tarball is utilized
|
||||
in order to make building easier.
|
||||
*/
|
||||
|
||||
@@ -20,6 +20,7 @@ import (
|
||||
"github.com/fsouza/go-dockerclient"
|
||||
)
|
||||
|
||||
// DockerClient connects to Docker client on host
|
||||
func DockerClient() (*docker.Client, error) {
|
||||
|
||||
// Default end-point, HTTP + TLS support to be added in the future
|
||||
|
||||
@@ -24,12 +24,13 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// Push will provide methods for interaction with API regarding pushing images
|
||||
type Push struct {
|
||||
Client dockerlib.Client
|
||||
}
|
||||
|
||||
/*
|
||||
Push a Docker image via the Docker API. Takes the image name,
|
||||
PushImage push a Docker image via the Docker API. Takes the image name,
|
||||
parses the URL details and then push based on environment authentication
|
||||
credentials.
|
||||
*/
|
||||
@@ -80,5 +81,5 @@ func (c *Push) PushImage(fullImageName string) error {
|
||||
}
|
||||
}
|
||||
|
||||
return errors.New("Unable to push docker image(s). Check that `docker login` works successfully on the command line.")
|
||||
return errors.New("unable to push docker image(s). Check that `docker login` works successfully on the command line")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user