From 9961816adead89622f5d4201a0b5cb33845fa852 Mon Sep 17 00:00:00 2001 From: David Calavera Date: Mon, 4 Jan 2016 12:43:38 -0500 Subject: [PATCH] Remove version package from API types. It's an internal type that only extends string. Signed-off-by: David Calavera --- api/client/version.go | 3 +-- api/server/router/system/system_routes.go | 2 +- api/types/types.go | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/api/client/version.go b/api/client/version.go index c4abbf0949..83ba89660b 100644 --- a/api/client/version.go +++ b/api/client/version.go @@ -9,7 +9,6 @@ import ( Cli "github.com/docker/docker/cli" "github.com/docker/docker/dockerversion" flag "github.com/docker/docker/pkg/mflag" - "github.com/docker/docker/pkg/version" "github.com/docker/docker/utils" ) @@ -57,7 +56,7 @@ func (cli *DockerCli) CmdVersion(args ...string) (err error) { vd := types.VersionResponse{ Client: &types.Version{ Version: dockerversion.Version, - APIVersion: version.Version(cli.client.ClientVersion()), + APIVersion: cli.client.ClientVersion(), GoVersion: runtime.Version(), GitCommit: dockerversion.GitCommit, BuildTime: dockerversion.BuildTime, diff --git a/api/server/router/system/system_routes.go b/api/server/router/system/system_routes.go index d5fd655980..0a2e2c18c6 100644 --- a/api/server/router/system/system_routes.go +++ b/api/server/router/system/system_routes.go @@ -37,7 +37,7 @@ func (s *systemRouter) getInfo(ctx context.Context, w http.ResponseWriter, r *ht func (s *systemRouter) getVersion(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error { info := s.backend.SystemVersion() - info.APIVersion = api.DefaultVersion + info.APIVersion = api.DefaultVersion.String() return httputils.WriteJSON(w, http.StatusOK, info) } diff --git a/api/types/types.go b/api/types/types.go index c4267858d3..11c447116f 100644 --- a/api/types/types.go +++ b/api/types/types.go @@ -7,7 +7,6 @@ import ( "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/network" "github.com/docker/docker/api/types/registry" - "github.com/docker/docker/pkg/version" "github.com/docker/go-connections/nat" ) @@ -178,7 +177,7 @@ type ContainerProcessList struct { // GET "/version" type Version struct { Version string - APIVersion version.Version `json:"ApiVersion"` + APIVersion string `json:"ApiVersion"` GitCommit string GoVersion string Os string