зеркало из https://github.com/microsoft/docker.git
gofmt whole directory
Signed-off-by: Ankush Agarwal <ankushagarwal11@gmail.com>
This commit is contained in:
Родитель
b7950b725b
Коммит
edf541c22b
|
@ -145,7 +145,7 @@ func (cli *DockerCli) CmdStats(args ...string) error {
|
||||||
if len(errs) > 0 {
|
if len(errs) > 0 {
|
||||||
return fmt.Errorf("%s", strings.Join(errs, ", "))
|
return fmt.Errorf("%s", strings.Join(errs, ", "))
|
||||||
}
|
}
|
||||||
for _ = range time.Tick(500 * time.Millisecond) {
|
for range time.Tick(500 * time.Millisecond) {
|
||||||
printHeader()
|
printHeader()
|
||||||
toRemove := []int{}
|
toRemove := []int{}
|
||||||
for i, s := range cStats {
|
for i, s := range cStats {
|
||||||
|
|
|
@ -299,7 +299,7 @@ func (cli *DockerCli) monitorTtySize(id string, isExec bool) error {
|
||||||
sigchan := make(chan os.Signal, 1)
|
sigchan := make(chan os.Signal, 1)
|
||||||
gosignal.Notify(sigchan, signal.SIGWINCH)
|
gosignal.Notify(sigchan, signal.SIGWINCH)
|
||||||
go func() {
|
go func() {
|
||||||
for _ = range sigchan {
|
for range sigchan {
|
||||||
cli.resizeTty(id, isExec)
|
cli.resizeTty(id, isExec)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
|
@ -84,7 +84,7 @@ func handleStopSignals(p proxy.Proxy) {
|
||||||
s := make(chan os.Signal, 10)
|
s := make(chan os.Signal, 10)
|
||||||
signal.Notify(s, os.Interrupt, syscall.SIGTERM, syscall.SIGSTOP)
|
signal.Notify(s, os.Interrupt, syscall.SIGTERM, syscall.SIGSTOP)
|
||||||
|
|
||||||
for _ = range s {
|
for range s {
|
||||||
p.Close()
|
p.Close()
|
||||||
|
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
|
|
|
@ -76,7 +76,7 @@ func (s *statsCollector) unsubscribe(c *Container, ch chan interface{}) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *statsCollector) run() {
|
func (s *statsCollector) run() {
|
||||||
for _ = range time.Tick(s.interval) {
|
for range time.Tick(s.interval) {
|
||||||
for container, publisher := range s.publishers {
|
for container, publisher := range s.publishers {
|
||||||
systemUsage, err := s.getSystemCpuUsage()
|
systemUsage, err := s.getSystemCpuUsage()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче