Skip to content

Commit d600384

Browse files
committed
Simplify types of Instance.SecurityGroup and Instance.Networks
These both have a type of pointer to slice, which is: * Redundant in Go * Is marshalled identically in the CRD To verify the latter, note that there are no changes to the CRD despite the type change. Also note that the values are unused. The reason for fixing these types is that Semantic.DeepEqual can't compare them correctly so they break the fuzzer tests.
1 parent 434cfe2 commit d600384

File tree

4 files changed

+14
-30
lines changed

4 files changed

+14
-30
lines changed

api/v1alpha5/types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ type Instance struct {
162162
Name string `json:"name,omitempty"`
163163
Trunk bool `json:"trunk,omitempty"`
164164
FailureDomain string `json:"failureDomain,omitempty"`
165-
SecurityGroups *[]string `json:"securigyGroups,omitempty"`
166-
Networks *[]Network `json:"networks,omitempty"`
165+
SecurityGroups []string `json:"securigyGroups,omitempty"`
166+
Networks []Network `json:"networks,omitempty"`
167167
Subnet string `json:"subnet,omitempty"`
168168
Tags []string `json:"tags,omitempty"`
169169
Image string `json:"image,omitempty"`

api/v1alpha5/zz_generated.deepcopy.go

Lines changed: 5 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/v1alpha6/types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ type Instance struct {
172172
Name string `json:"name,omitempty"`
173173
Trunk bool `json:"trunk,omitempty"`
174174
FailureDomain string `json:"failureDomain,omitempty"`
175-
SecurityGroups *[]string `json:"securigyGroups,omitempty"`
176-
Networks *[]Network `json:"networks,omitempty"`
175+
SecurityGroups []string `json:"securigyGroups,omitempty"`
176+
Networks []Network `json:"networks,omitempty"`
177177
Subnet string `json:"subnet,omitempty"`
178178
Tags []string `json:"tags,omitempty"`
179179
Image string `json:"image,omitempty"`

api/v1alpha6/zz_generated.deepcopy.go

Lines changed: 5 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)