Skip to content

Commit 3bbe47e

Browse files
mrunalpMa Shimiao
authored andcommitted
Remove pointers for slices preferring omitempty tag instead
Signed-off-by: Mrunal Patel <[email protected]>
1 parent 204bc77 commit 3bbe47e

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

runtime_config_linux.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -139,15 +139,15 @@ type BlockIO struct {
139139
// Specifies tasks' weight in the given cgroup while competing with the cgroup's child cgroups, range is from 10 to 1000, CFQ scheduler only
140140
LeafWeight *uint16 `json:"blkioLeafWeight,omitempty"`
141141
// Weight per cgroup per device, can override BlkioWeight
142-
WeightDevice []*WeightDevice `json:"blkioWeightDevice,omitempty"`
142+
WeightDevice []WeightDevice `json:"blkioWeightDevice,omitempty"`
143143
// IO read rate limit per cgroup per device, bytes per second
144-
ThrottleReadBpsDevice []*ThrottleDevice `json:"blkioThrottleReadBpsDevice,omitempty"`
144+
ThrottleReadBpsDevice []ThrottleDevice `json:"blkioThrottleReadBpsDevice,omitempty"`
145145
// IO write rate limit per cgroup per device, bytes per second
146-
ThrottleWriteBpsDevice []*ThrottleDevice `json:"blkioThrottleWriteBpsDevice,omitempty"`
146+
ThrottleWriteBpsDevice []ThrottleDevice `json:"blkioThrottleWriteBpsDevice,omitempty"`
147147
// IO read rate limit per cgroup per device, IO per second
148-
ThrottleReadIOPSDevice []*ThrottleDevice `json:"blkioThrottleReadIOPSDevice,omitempty"`
148+
ThrottleReadIOPSDevice []ThrottleDevice `json:"blkioThrottleReadIOPSDevice,omitempty"`
149149
// IO write rate limit per cgroup per device, IO per second
150-
ThrottleWriteIOPSDevice []*ThrottleDevice `json:"blkioThrottleWriteIOPSDevice,omitempty"`
150+
ThrottleWriteIOPSDevice []ThrottleDevice `json:"blkioThrottleWriteIOPSDevice,omitempty"`
151151
}
152152

153153
// Memory for Linux cgroup 'memory' resource management
@@ -195,7 +195,7 @@ type Network struct {
195195
// Set class identifier for container's network packets
196196
ClassID *uint32 `json:"classID"`
197197
// Set priority of network traffic for container
198-
Priorities []InterfacePriority `json:"priorities"`
198+
Priorities []InterfacePriority `json:"priorities,omitempty"`
199199
}
200200

201201
// Resources has container runtime resource constraints
@@ -240,9 +240,9 @@ type Device struct {
240240

241241
// Seccomp represents syscall restrictions
242242
type Seccomp struct {
243-
DefaultAction Action `json:"defaultAction"`
244-
Architectures []Arch `json:"architectures"`
245-
Syscalls []*Syscall `json:"syscalls"`
243+
DefaultAction Action `json:"defaultAction"`
244+
Architectures []Arch `json:"architectures"`
245+
Syscalls []Syscall `json:"syscalls,omitempty"`
246246
}
247247

248248
// Arch used for additional architectures
@@ -302,5 +302,5 @@ type Arg struct {
302302
type Syscall struct {
303303
Name string `json:"name"`
304304
Action Action `json:"action"`
305-
Args []*Arg `json:"args"`
305+
Args []Arg `json:"args,omitempty"`
306306
}

0 commit comments

Comments
 (0)