enable gocritic linter

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
Matthieu MOREL
2023-03-12 10:24:30 +01:00
parent 5a7619c019
commit 79f524689c
13 changed files with 39 additions and 33 deletions

View File

@ -51,10 +51,11 @@ type Net struct {
Type string `json:"type,omitempty"`
BrName string `json:"bridge"`
IPAM *allocator.IPAMConfig `json:"ipam"`
//RuntimeConfig struct { // The capability arg
// RuntimeConfig struct { // The capability arg
// IPRanges []RangeSet `json:"ipRanges,omitempty"`
//} `json:"runtimeConfig,omitempty"`
//Args *struct {
// Args *struct {
// } `json:"runtimeConfig,omitempty"`
// A *IPAMArgs `json:"cni"`
DNS types.DNS `json:"dns"`
RawPrevResult map[string]interface{} `json:"prevResult,omitempty"`
@ -1497,11 +1498,12 @@ func (tester *testerV01xOr02x) cmdDelTest(tc testCase, dataDir string) {
err := testutils.CmdDelWithArgs(tester.args, func() error {
return cmdDel(tester.args)
})
if expect020DelError(tc) {
switch {
case expect020DelError(tc):
Expect(err).To(MatchError(tc.DelErr020))
} else if expect010DelError(tc) {
case expect010DelError(tc):
Expect(err).To(MatchError(tc.DelErr010))
} else {
default:
Expect(err).NotTo(HaveOccurred())
}
return nil