Skip to content

Commit d4c1392

Browse files
committed
add example input/output to processTokens function documentation
1 parent 8c780dc commit d4c1392

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

coderd/searchquery/search.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,8 +389,11 @@ func splitQueryParameterByDelimiter(query string, delimiter rune, maintainQuotes
389389
return parts
390390
}
391391

392-
// processTokens takes the split tokens and groups them based on a delimiter. Tokens
393-
// without a delimiter present are joined to support searching with spaces.
392+
// processTokens takes the split tokens and groups them based on a delimiter (':').
393+
// Tokens without a delimiter present are joined to support searching with spaces.
394+
//
395+
// Example Input: ['deprecated:false', 'test', 'template']
396+
// Example Output: ['deprecated:false', 'test template']
394397
func processTokens(tokens []string) []string {
395398
var results []string
396399
var nonFieldTerms []string

0 commit comments

Comments
 (0)