Updated code with go lint result

Updated code with suggestion given by `go lint`
This commit is contained in:
Suraj Narwade
2017-07-14 11:11:17 +05:30
parent 462453208b
commit 91a6e79d6f
6 changed files with 13 additions and 7 deletions
+2 -1
View File
@@ -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.
*/
+1
View File
@@ -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
+3 -2
View File
@@ -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")
}