Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor fix on comments #96974

Merged
merged 1 commit into from Dec 9, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions staging/src/k8s.io/apimachinery/pkg/labels/selector.go
Expand Up @@ -318,7 +318,7 @@ func (r *Requirement) String() string {
return buffer.String()
}

// safeSort sort input strings without modification
// safeSort sorts input strings without modification
func safeSort(in []string) []string {
if sort.StringsAreSorted(in) {
return in
Expand Down Expand Up @@ -366,7 +366,7 @@ func (s internalSelector) String() string {
return strings.Join(reqs, ",")
}

// RequiresExactMatch introspect whether a given selector requires a single specific field
// RequiresExactMatch introspects whether a given selector requires a single specific field
// to be set, and if so returns the value it requires.
func (s internalSelector) RequiresExactMatch(label string) (value string, found bool) {
for ix := range s {
Expand Down Expand Up @@ -444,7 +444,7 @@ func isWhitespace(ch byte) bool {
return ch == ' ' || ch == '\t' || ch == '\r' || ch == '\n'
}

// isSpecialSymbol detect if the character ch can be an operator
// isSpecialSymbol detects if the character ch can be an operator
func isSpecialSymbol(ch byte) bool {
switch ch {
case '=', '!', '(', ')', ',', '>', '<':
Expand All @@ -462,7 +462,7 @@ type Lexer struct {
pos int
}

// read return the character currently lexed
// read returns the character currently lexed
// increment the position and check the buffer overflow
func (l *Lexer) read() (b byte) {
b = 0
Expand Down Expand Up @@ -698,7 +698,7 @@ func (p *Parser) parseKeyAndInferOperator() (string, selection.Operator, error)
return literal, operator, nil
}

// parseOperator return operator and eventually matchType
// parseOperator returns operator and eventually matchType
// matchType can be exact
func (p *Parser) parseOperator() (op selection.Operator, err error) {
tok, lit := p.consume(KeyAndOperator)
Expand Down