mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-30 01:02:33 +00:00
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:
parent
d51a5e303d
commit
b1628639e8
@ -112,6 +112,6 @@ func TestAssetNew(t *testing.T) {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
a, err = newAsset(p, kernelAsset)
|
_, err = newAsset(p, kernelAsset)
|
||||||
assert.NotNil(err)
|
assert.NotNil(err)
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user