Skip to content

Commit

Permalink
Use references instead of duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
ReToCode committed Sep 21, 2023
1 parent f87cb2a commit ec5b1c7
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions pkg/apis/networking/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,7 @@ var (
}

// Deprecated: use DisableExternalDomainTLSAnnotation instead.
DisableAutoTLSAnnotation = kmap.KeyPriority{
DisableAutoTLSAnnotationKey,
DisableAutoTLSAnnotationAltKey,

// backward compatibility
DisableExternalDomainTLSAnnotationKey,
}
DisableAutoTLSAnnotation = DisableExternalDomainTLSAnnotation

DisableExternalDomainTLSAnnotation = kmap.KeyPriority{
// backward compatibility
Expand Down Expand Up @@ -172,9 +166,7 @@ func GetHTTPProtocol(annotations map[string]string) (val string) {
}

// Deprecated: use GetDisableExternalDomainTLS instead.

Check failure on line 168 in pkg/apis/networking/register.go

View workflow job for this annotation

GitHub Actions / style / Golang / Lint

ST1022: comment on exported var GetDisableAutoTLS should be of the form "GetDisableAutoTLS ..." (stylecheck)
func GetDisableAutoTLS(annotations map[string]string) (val string) {
return DisableAutoTLSAnnotation.Value(annotations)
}
var GetDisableAutoTLS = GetDisableExternalDomainTLS

func GetDisableExternalDomainTLS(annotations map[string]string) (val string) {
return DisableExternalDomainTLSAnnotation.Value(annotations)
Expand Down

0 comments on commit ec5b1c7

Please sign in to comment.