Skip to content

Commit 42dca02

Browse files
author
lamai93
committed
Tricky utils!
1 parent 20265a4 commit 42dca02

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

pkg/apis/deployment/v1alpha/license_spec.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,7 @@ func (s LicenseSpec) HasSecretName() bool {
3737

3838
// GetSecretName returns the license key if set. Empty string otherwise.
3939
func (s LicenseSpec) GetSecretName() string {
40-
if s.HasSecretName() {
41-
return *s.SecretName
42-
}
43-
44-
return ""
40+
return util.StringOrDefault(s.SecretName)
4541
}
4642

4743
// Validate validates the LicenseSpec

0 commit comments

Comments
 (0)