浏览代码

rename goruntime import to runtime

This renames the goruntime import of the runtime package back to
runtime.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
unclejack 11 年之前
父节点
当前提交
4c2b9d7324
共有 3 个文件被更改,包括 9 次插入9 次删除
  1. 2 2
      api/client/commands.go
  2. 2 2
      integration/runtime_test.go
  3. 5 5
      server/server.go

+ 2 - 2
api/client/commands.go

@@ -13,7 +13,7 @@ import (
 	"os"
 	"os"
 	"os/exec"
 	"os/exec"
 	"path"
 	"path"
-	goruntime "runtime"
+	"runtime"
 	"strconv"
 	"strconv"
 	"strings"
 	"strings"
 	"syscall"
 	"syscall"
@@ -359,7 +359,7 @@ func (cli *DockerCli) CmdVersion(args ...string) error {
 		fmt.Fprintf(cli.out, "Client version: %s\n", dockerversion.VERSION)
 		fmt.Fprintf(cli.out, "Client version: %s\n", dockerversion.VERSION)
 	}
 	}
 	fmt.Fprintf(cli.out, "Client API version: %s\n", api.APIVERSION)
 	fmt.Fprintf(cli.out, "Client API version: %s\n", api.APIVERSION)
-	fmt.Fprintf(cli.out, "Go version (client): %s\n", goruntime.Version())
+	fmt.Fprintf(cli.out, "Go version (client): %s\n", runtime.Version())
 	if dockerversion.GITCOMMIT != "" {
 	if dockerversion.GITCOMMIT != "" {
 		fmt.Fprintf(cli.out, "Git commit (client): %s\n", dockerversion.GITCOMMIT)
 		fmt.Fprintf(cli.out, "Git commit (client): %s\n", dockerversion.GITCOMMIT)
 	}
 	}

+ 2 - 2
integration/runtime_test.go

@@ -16,7 +16,7 @@ import (
 	"net/url"
 	"net/url"
 	"os"
 	"os"
 	"path/filepath"
 	"path/filepath"
-	goruntime "runtime"
+	"runtime"
 	"strconv"
 	"strconv"
 	"strings"
 	"strings"
 	"syscall"
 	"syscall"
@@ -127,7 +127,7 @@ func init() {
 	spawnGlobalDaemon()
 	spawnGlobalDaemon()
 	spawnLegitHttpsDaemon()
 	spawnLegitHttpsDaemon()
 	spawnRogueHttpsDaemon()
 	spawnRogueHttpsDaemon()
-	startFds, startGoroutines = utils.GetTotalUsedFds(), goruntime.NumGoroutine()
+	startFds, startGoroutines = utils.GetTotalUsedFds(), runtime.NumGoroutine()
 }
 }
 
 
 func setupBaseImage() {
 func setupBaseImage() {

+ 5 - 5
server/server.go

@@ -34,7 +34,7 @@ import (
 	gosignal "os/signal"
 	gosignal "os/signal"
 	"path"
 	"path"
 	"path/filepath"
 	"path/filepath"
-	goruntime "runtime"
+	"runtime"
 	"strconv"
 	"strconv"
 	"strings"
 	"strings"
 	"sync"
 	"sync"
@@ -789,7 +789,7 @@ func (srv *Server) DockerInfo(job *engine.Job) engine.Status {
 	v.SetBool("IPv4Forwarding", !srv.daemon.SystemConfig().IPv4ForwardingDisabled)
 	v.SetBool("IPv4Forwarding", !srv.daemon.SystemConfig().IPv4ForwardingDisabled)
 	v.SetBool("Debug", os.Getenv("DEBUG") != "")
 	v.SetBool("Debug", os.Getenv("DEBUG") != "")
 	v.SetInt("NFd", utils.GetTotalUsedFds())
 	v.SetInt("NFd", utils.GetTotalUsedFds())
-	v.SetInt("NGoroutines", goruntime.NumGoroutine())
+	v.SetInt("NGoroutines", runtime.NumGoroutine())
 	v.Set("ExecutionDriver", srv.daemon.ExecutionDriver().Name())
 	v.Set("ExecutionDriver", srv.daemon.ExecutionDriver().Name())
 	v.SetInt("NEventsListener", len(srv.listeners))
 	v.SetInt("NEventsListener", len(srv.listeners))
 	v.Set("KernelVersion", kernelVersion)
 	v.Set("KernelVersion", kernelVersion)
@@ -807,9 +807,9 @@ func (srv *Server) DockerVersion(job *engine.Job) engine.Status {
 	v.Set("Version", dockerversion.VERSION)
 	v.Set("Version", dockerversion.VERSION)
 	v.SetJson("ApiVersion", api.APIVERSION)
 	v.SetJson("ApiVersion", api.APIVERSION)
 	v.Set("GitCommit", dockerversion.GITCOMMIT)
 	v.Set("GitCommit", dockerversion.GITCOMMIT)
-	v.Set("GoVersion", goruntime.Version())
-	v.Set("Os", goruntime.GOOS)
-	v.Set("Arch", goruntime.GOARCH)
+	v.Set("GoVersion", runtime.Version())
+	v.Set("Os", runtime.GOOS)
+	v.Set("Arch", runtime.GOARCH)
 	if kernelVersion, err := utils.GetKernelVersion(); err == nil {
 	if kernelVersion, err := utils.GetKernelVersion(); err == nil {
 		v.Set("KernelVersion", kernelVersion.String())
 		v.Set("KernelVersion", kernelVersion.String())
 	}
 	}