fix some comments (#9688)

Signed-off-by: cui fliter <imcusg@gmail.com>
This commit is contained in:
cui fliter 2023-03-06 03:00:57 +08:00 committed by GitHub
parent 640bdac76d
commit 82e836fbe8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 10 additions and 9 deletions

View file

@ -34,7 +34,7 @@ import (
"k8s.io/ingress-nginx/pkg/apis/ingress"
)
// getEndpoints returns a list of Endpoint structs for a given service/target port combination.
// getEndpointsFromSlices returns a list of Endpoint structs for a given service/target port combination.
func getEndpointsFromSlices(s *corev1.Service, port *corev1.ServicePort, proto corev1.Protocol, zoneForHints string,
getServiceEndpointsSlices func(string) ([]*discoveryv1.EndpointSlice, error)) []ingress.Endpoint {

View file

@ -1732,7 +1732,7 @@ func buildServerName(hostname string) string {
return `~^(?<subdomain>[\w-]+)\.` + strings.Join(parts, "\\.") + `$`
}
// parseComplexNGINXVar parses things like "$my${complex}ngx\$var" into
// parseComplexNginxVarIntoLuaTable parses things like "$my${complex}ngx\$var" into
// [["$var", "complex", "my", "ngx"]]. In other words, 2nd and 3rd elements
// in the result are actual NGINX variable names, whereas first and 4th elements
// are string literals.