Skip to content

Commit 4ded65e

Browse files
Use IsNilValue for all Merge() methods (#764)
1 parent 771e5be commit 4ded65e

19 files changed

Lines changed: 20 additions & 20 deletions

File tree

pkg/provider/garden/ruleset/securityhardenedshoot/rules/1000.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ type Extension struct {
3535
}
3636

3737
func (o *Options1000) Merge(other option.MergeableOption) (option.MergeableOption, error) {
38-
if other == nil {
38+
if option.IsNilValue(other) {
3939
return o, nil
4040
}
4141

pkg/provider/garden/ruleset/securityhardenedshoot/rules/1001.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ type Options1001 struct {
3939
}
4040

4141
func (o *Options1001) Merge(other option.MergeableOption) (option.MergeableOption, error) {
42-
if other == nil {
42+
if option.IsNilValue(other) {
4343
return o, nil
4444
}
4545

pkg/provider/garden/ruleset/securityhardenedshoot/rules/1002.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ type MachineImage struct {
4444
}
4545

4646
func (o *Options1002) Merge(other option.MergeableOption) (option.MergeableOption, error) {
47-
if other == nil {
47+
if option.IsNilValue(other) {
4848
return o, nil
4949
}
5050

pkg/provider/garden/ruleset/securityhardenedshoot/rules/1003.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ type Options1003 struct {
4343
}
4444

4545
func (o *Options1003) Merge(other option.MergeableOption) (option.MergeableOption, error) {
46-
if other == nil {
46+
if option.IsNilValue(other) {
4747
return o, nil
4848
}
4949

pkg/provider/garden/ruleset/securityhardenedshoot/rules/2000.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ type AcceptedEndpoint struct {
4545
}
4646

4747
func (o *Options2000) Merge(other option.MergeableOption) (option.MergeableOption, error) {
48-
if other == nil {
48+
if option.IsNilValue(other) {
4949
return o, nil
5050
}
5151

pkg/provider/garden/ruleset/securityhardenedshoot/rules/2007.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ type Options2007 struct {
3636
}
3737

3838
func (o *Options2007) Merge(other option.MergeableOption) (option.MergeableOption, error) {
39-
if other == nil {
39+
if option.IsNilValue(other) {
4040
return o, nil
4141
}
4242

pkg/provider/gardener/ruleset/disak8sstig/rules/242400.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ type Options242400 struct {
5757
}
5858

5959
func (o *Options242400) Merge(other option.MergeableOption) (option.MergeableOption, error) {
60-
if other == nil {
60+
if option.IsNilValue(other) {
6161
return o, nil
6262
}
6363

pkg/provider/gardener/ruleset/disak8sstig/rules/242466.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ type Options242466 struct {
5555
}
5656

5757
func (o *Options242466) Merge(other option.MergeableOption) (option.MergeableOption, error) {
58-
if other == nil {
58+
if option.IsNilValue(other) {
5959
return o, nil
6060
}
6161

pkg/provider/gardener/ruleset/disak8sstig/rules/242467.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ type Options242467 struct {
5555
}
5656

5757
func (o *Options242467) Merge(other option.MergeableOption) (option.MergeableOption, error) {
58-
if other == nil {
58+
if option.IsNilValue(other) {
5959
return o, nil
6060
}
6161

pkg/provider/managedk8s/ruleset/securityhardenedk8s/rules/2000.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ type AcceptedTraffic struct {
8080
// Merge returns a new Options2000 that is the result of merging other into the receiver.
8181
// AcceptedNamespaces slices are concatenated. If other is not *Options2000, an error is returned.
8282
func (o *Options2000) Merge(other option.MergeableOption) (option.MergeableOption, error) {
83-
if other == nil {
83+
if option.IsNilValue(other) {
8484
return o, nil
8585
}
8686

0 commit comments

Comments
 (0)