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)
}

View File

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

View File

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

View File

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

View File

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