Skip to content

Commit 1d661df

Browse files
committed
fix white space issues
Signed-off-by: Michael Zappa <[email protected]>
1 parent e4fd289 commit 1d661df

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

cni.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -194,20 +194,20 @@ func (c *libcni) SetupSerially(ctx context.Context, id string, path string, opts
194194
return c.createResult(result)
195195
}
196196

197-
// BuildMultiNetwork build dynamic list of Networks.
197+
// BuildMultiNetwork build dynamic list of Networks.
198198
func (c *libcni) BuildMultiNetwork(networkNames []*NetworkInterface) ([]*Network, error) {
199199
var network []*Network
200200
ifaceindex := 0
201201

202202
config := make(map[string]*Network)
203203
ifs := make(map[string]*Network)
204204

205-
for _, v := range c.Networks(){
205+
for _, v := range c.Networks() {
206206
config[v.config.Name] = v
207207
}
208208

209209
name := ""
210-
for _,v := range networkNames {
210+
for _, v := range networkNames {
211211
if net, ok := config[v.NetworkName]; ok {
212212
if v.InterfaceName == "" {
213213
name = getIfName(c.prefix, ifaceindex)
@@ -217,14 +217,14 @@ func (c *libcni) BuildMultiNetwork(networkNames []*NetworkInterface) ([]*Network
217217
}
218218

219219
network = append(network, &Network{
220-
cni: net.cni,
220+
cni: net.cni,
221221
config: net.config,
222222
ifName: name,
223223
})
224224

225225
if _, ok := ifs[name]; ok {
226226
return nil, fmt.Errorf("the interface: %v already exists and must be unique", name)
227-
}
227+
}
228228

229229
ifs[name] = net
230230
} else {

cni_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ func TestBuildNetworksWithAnnotation(t *testing.T) {
314314
InterfaceName: "net1",
315315
},
316316
{
317-
NetworkName: "plugin2",
317+
NetworkName: "plugin2",
318318
InterfaceName: "net10",
319319
},
320320
}
@@ -371,7 +371,7 @@ func TestBuildNetworksDuplicateIfName(t *testing.T) {
371371
//InterfaceName: "This should be commented out"
372372
},
373373
{
374-
NetworkName: "plugin2",
374+
NetworkName: "plugin2",
375375
InterfaceName: "net10",
376376
},
377377
}

0 commit comments

Comments
 (0)