mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-22 19:23:24 +00:00
Merge pull request #2203 from fidencio/wip/fix-static-checks
runtime: Fix lint issues
This commit is contained in:
commit
75356967c6
@ -73,7 +73,7 @@ func init() {
|
|||||||
var err error
|
var err error
|
||||||
|
|
||||||
fmt.Printf("INFO: creating test directory\n")
|
fmt.Printf("INFO: creating test directory\n")
|
||||||
testDir, err = ioutil.TempDir("", fmt.Sprintf("shimV2-"))
|
testDir, err = ioutil.TempDir("", "shimV2-")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(fmt.Sprintf("ERROR: failed to create test directory: %v", err))
|
panic(fmt.Sprintf("ERROR: failed to create test directory: %v", err))
|
||||||
}
|
}
|
||||||
|
@ -428,9 +428,7 @@ func HybridVSockDialer(sock string, timeout time.Duration) (net.Conn, error) {
|
|||||||
|
|
||||||
// just for tests use.
|
// just for tests use.
|
||||||
func MockHybridVSockDialer(sock string, timeout time.Duration) (net.Conn, error) {
|
func MockHybridVSockDialer(sock string, timeout time.Duration) (net.Conn, error) {
|
||||||
if strings.HasPrefix(sock, "mock:") {
|
|
||||||
sock = strings.TrimPrefix(sock, "mock:")
|
sock = strings.TrimPrefix(sock, "mock:")
|
||||||
}
|
|
||||||
|
|
||||||
dialFunc := func() (net.Conn, error) {
|
dialFunc := func() (net.Conn, error) {
|
||||||
return net.DialTimeout("unix", sock, timeout)
|
return net.DialTimeout("unix", sock, timeout)
|
||||||
|
@ -57,6 +57,7 @@ func (b Builder) Add(elems ...int) {
|
|||||||
// Result returns the result CPUSet containing all elements that were
|
// Result returns the result CPUSet containing all elements that were
|
||||||
// previously added to this builder. Subsequent calls to Add have no effect.
|
// previously added to this builder. Subsequent calls to Add have no effect.
|
||||||
func (b Builder) Result() CPUSet {
|
func (b Builder) Result() CPUSet {
|
||||||
|
// nolint: staticcheck
|
||||||
b.done = true
|
b.done = true
|
||||||
return b.result
|
return b.result
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user