These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.
Remove these imports in preparation of migrating our code to become an
actual go module.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
daemon/daemon_unix_test.go:277:3: The copy of the 'for' variable "tc" can be deleted (Go 1.22+) (copyloopvar)
tc := tc
^
daemon/delete_test.go:71:3: The copy of the 'for' variable "tc" can be deleted (Go 1.22+) (copyloopvar)
tc := tc
^
daemon/exec_linux_test.go:65:4: The copy of the 'for' variable "tc" can be deleted (Go 1.22+) (copyloopvar)
tc := tc
^
daemon/info_unix_test.go:54:3: The copy of the 'for' variable "test" can be deleted (Go 1.22+) (copyloopvar)
test := test
^
daemon/runtime_unix_test.go:173:3: The copy of the 'for' variable "tc" can be deleted (Go 1.22+) (copyloopvar)
tc := tc
^
daemon/runtime_unix_test.go:333:3: The copy of the 'for' variable "tt" can be deleted (Go 1.22+) (copyloopvar)
tt := tt
^
daemon/seccomp_linux_test.go:194:3: The copy of the 'for' variable "x" can be deleted (Go 1.22+) (copyloopvar)
x := x
^
daemon/top_unix_test.go:88:3: The copy of the 'for' variable "tc" can be deleted (Go 1.22+) (copyloopvar)
tc := tc
^
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The t.Log() caused some unneeded noise; changing these
tests to us subtests instead, so that we can track them
more easily.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Changed per requested review to refactor to make it more logic clear.
Current output for "docker top <contianer-id> m" option,eg:
root@b2c7ec58399d:/go/src/github.com/docker/docker# docker top 755d5871ec45 am
PID TTY STAT TIME COMMAND
148 pts/0 - 0:00 bash
- - Ss+ 0:00 -
fixing issue:#30580
Signed-off-by: catinthesky <yaozaiyong@hotmail.com>