pkg/version.Version: use the new String() method

Resolves #18750

Signed-off-by: Aditi Rajagopal <arajagopal@us.ibm.com>
This commit is contained in:
Aditi Rajagopal 2015-12-18 15:28:17 -05:00
parent 92605b823d
commit 278e75800c
2 changed files with 3 additions and 3 deletions

View file

@ -104,7 +104,7 @@ func NewDockerCli(in io.ReadCloser, out, err io.Writer, clientFlags *cli.ClientF
}
customHeaders["User-Agent"] = "Docker-Client/" + dockerversion.Version + " (" + runtime.GOOS + ")"
verStr := string(api.DefaultVersion)
verStr := api.DefaultVersion.String()
if tmpStr := os.Getenv("DOCKER_API_VERSION"); tmpStr != "" {
verStr = tmpStr
}

View file

@ -49,7 +49,7 @@ func (s *DockerSuite) TestApiVersionStatusCode(c *check.C) {
}
func (s *DockerSuite) TestApiClientVersionNewerThanServer(c *check.C) {
v := strings.Split(string(api.DefaultVersion), ".")
v := strings.Split(api.DefaultVersion.String(), ".")
vMinInt, err := strconv.Atoi(v[1])
c.Assert(err, checker.IsNil)
vMinInt++
@ -63,7 +63,7 @@ func (s *DockerSuite) TestApiClientVersionNewerThanServer(c *check.C) {
}
func (s *DockerSuite) TestApiClientVersionOldNotSupported(c *check.C) {
v := strings.Split(string(api.MinVersion), ".")
v := strings.Split(api.MinVersion.String(), ".")
vMinInt, err := strconv.Atoi(v[1])
c.Assert(err, checker.IsNil)
vMinInt--