Fix golint warnings for daemon/execdriver/*
Addresses: #14756 Signed-off-by: Qiang Huang <h.huangqiang@huawei.com> Upstream-commit: 3d17c3bb663a5d7a65bd39a5ef32cb4668b48c53 Component: engine
This commit is contained in:
@ -10,12 +10,17 @@ import (
|
||||
|
||||
"github.com/docker/docker/daemon/execdriver"
|
||||
"github.com/opencontainers/runc/libcontainer"
|
||||
// Blank import 'nsenter' so that init in that package will call c
|
||||
// function 'nsexec()' to do 'setns' before Go runtime take over,
|
||||
// it's used for join to exist ns like 'docker exec' command.
|
||||
_ "github.com/opencontainers/runc/libcontainer/nsenter"
|
||||
"github.com/opencontainers/runc/libcontainer/utils"
|
||||
)
|
||||
|
||||
// Exec implements the exec driver Driver interface,
|
||||
// it calls libcontainer APIs to execute a container.
|
||||
// TODO(vishh): Add support for running in privileged mode.
|
||||
func (d *driver) Exec(c *execdriver.Command, processConfig *execdriver.ProcessConfig, pipes *execdriver.Pipes, startCallback execdriver.StartCallback) (int, error) {
|
||||
func (d *Driver) Exec(c *execdriver.Command, processConfig *execdriver.ProcessConfig, pipes *execdriver.Pipes, startCallback execdriver.StartCallback) (int, error) {
|
||||
active := d.activeContainers[c.ID]
|
||||
if active == nil {
|
||||
return -1, fmt.Errorf("No active container exists with ID %s", c.ID)
|
||||
|
||||
Reference in New Issue
Block a user