1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #18779 from aditirajagopal/18750-new-string-method

pkg/version.Version: use the new String() method
This commit is contained in:
Doug Davis 2015-12-18 21:21:17 -05:00
commit 7ff61dd592
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--