lint: Fix virtcontainers staticcheck errors

Correct `staticcheck` linter issues.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
James O. D. Hunt 2018-03-19 19:24:26 +00:00
parent d51a5e303d
commit b1628639e8
5 changed files with 8 additions and 8 deletions

View File

@ -112,6 +112,6 @@ func TestAssetNew(t *testing.T) {
}, },
} }
a, err = newAsset(p, kernelAsset) _, err = newAsset(p, kernelAsset)
assert.NotNil(err) assert.NotNil(err)
} }

View File

@ -22,7 +22,7 @@ type bridgeType string
const ( const (
pciBridge bridgeType = "pci" pciBridge bridgeType = "pci"
pcieBridge = "pcie" pcieBridge bridgeType = "pcie"
) )
const pciBridgeMaxCapacity = 30 const pciBridgeMaxCapacity = 30

View File

@ -485,7 +485,7 @@ func (h *Hyperstart) WaitForPAE(containerID, processID string) (*PAECommand, err
msg := <-channel msg := <-channel
var paeData PAECommand var paeData PAECommand
err = json.Unmarshal(msg.Message, paeData) err = json.Unmarshal(msg.Message, &paeData)
if err != nil { if err != nil {
return nil, err return nil, err
} }

View File

@ -78,7 +78,7 @@ func (m *multicast) buildEventID(containerID, processID string) string {
func (m *multicast) sendEvent(msg *DecodedMessage) error { func (m *multicast) sendEvent(msg *DecodedMessage) error {
var paeData PAECommand var paeData PAECommand
err := json.Unmarshal(msg.Message, paeData) err := json.Unmarshal(msg.Message, &paeData)
if err != nil { if err != nil {
return err return err
} }

View File

@ -52,10 +52,10 @@ type NSType string
// without multithreading issues. // without multithreading issues.
const ( const (
NSTypeCGroup NSType = "cgroup" NSTypeCGroup NSType = "cgroup"
NSTypeIPC = "ipc" NSTypeIPC NSType = "ipc"
NSTypeNet = "net" NSTypeNet NSType = "net"
NSTypePID = "pid" NSTypePID NSType = "pid"
NSTypeUTS = "uts" NSTypeUTS NSType = "uts"
) )
// CloneFlagsTable is exported so that consumers of this package don't need // CloneFlagsTable is exported so that consumers of this package don't need