diff --git a/virtcontainers/asset_test.go b/virtcontainers/asset_test.go index b9798451a..132f9f6ba 100644 --- a/virtcontainers/asset_test.go +++ b/virtcontainers/asset_test.go @@ -112,6 +112,6 @@ func TestAssetNew(t *testing.T) { }, } - a, err = newAsset(p, kernelAsset) + _, err = newAsset(p, kernelAsset) assert.NotNil(err) } diff --git a/virtcontainers/bridge.go b/virtcontainers/bridge.go index c56c6ac58..dfddd3eee 100644 --- a/virtcontainers/bridge.go +++ b/virtcontainers/bridge.go @@ -22,7 +22,7 @@ type bridgeType string const ( pciBridge bridgeType = "pci" - pcieBridge = "pcie" + pcieBridge bridgeType = "pcie" ) const pciBridgeMaxCapacity = 30 diff --git a/virtcontainers/pkg/hyperstart/hyperstart.go b/virtcontainers/pkg/hyperstart/hyperstart.go index 991dfc88b..52401aa44 100644 --- a/virtcontainers/pkg/hyperstart/hyperstart.go +++ b/virtcontainers/pkg/hyperstart/hyperstart.go @@ -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 } diff --git a/virtcontainers/pkg/hyperstart/multicast.go b/virtcontainers/pkg/hyperstart/multicast.go index ddf1c3037..cedb86eaf 100644 --- a/virtcontainers/pkg/hyperstart/multicast.go +++ b/virtcontainers/pkg/hyperstart/multicast.go @@ -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 } diff --git a/virtcontainers/pkg/nsenter/nsenter.go b/virtcontainers/pkg/nsenter/nsenter.go index 782c25866..ffcfbfb69 100644 --- a/virtcontainers/pkg/nsenter/nsenter.go +++ b/virtcontainers/pkg/nsenter/nsenter.go @@ -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