strings.Replace(masked, "+:", string([]rune{escapedPlus, ':'}), -1)
681 })
682 masked = strings.Replace(masked, "::", string([]rune{escapedColon, ':'}), -1)
683 masked = strings.Replace(masked, ",:", string([]rune{escapedComma, ':'}), -1)
684 masked = strings.Replace(masked, "+:", string([]rune{escapedPlus, ':'}), -1) 685
686 idx := 0
687 for _, pairStr := range strings.Split(masked, ",") {
strings.Replace(masked, ",:", string([]rune{escapedComma, ':'}), -1)
680 return prefix + "(" + strings.Repeat(" ", len(src)-len(prefix)-2) + ")"
681 })
682 masked = strings.Replace(masked, "::", string([]rune{escapedColon, ':'}), -1)
683 masked = strings.Replace(masked, ",:", string([]rune{escapedComma, ':'}), -1) 684 masked = strings.Replace(masked, "+:", string([]rune{escapedPlus, ':'}), -1)
685
686 idx := 0
strings.Replace(masked, "::", string([]rune{escapedColon, ':'}), -1)
679 }
680 return prefix + "(" + strings.Repeat(" ", len(src)-len(prefix)-2) + ")"
681 })
682 masked = strings.Replace(masked, "::", string([]rune{escapedColon, ':'}), -1) 683 masked = strings.Replace(masked, ",:", string([]rune{escapedComma, ':'}), -1)
684 masked = strings.Replace(masked, "+:", string([]rune{escapedPlus, ':'}), -1)
685
strings.Replace(str, "\\t", "\t", -1)
360
361func delimiterRegexp(str string) Delimiter {
362 // Special handling of \t
363 str = strings.Replace(str, "\\t", "\t", -1) 364
365 // 1. Pattern does not contain any special character
366 if regexp.QuoteMeta(str) == str {
strings.Replace(token, "\t", " ", -1)
169 switchSet := false
170 afterBar := false
171 for _, token := range tokens {
172 typ, inv, text := termFuzzy, false, strings.Replace(token, "\t", " ", -1)173 lowerText := strings.ToLower(text)
174 caseSensitive := caseMode == CaseRespect ||
175 caseMode == CaseSmart && text != lowerText
Certain functions, for a particular set of arguments, have shorthands (helpers) that can be used instead.
We currently support Autofix for, Format: x => y where "x" is recommended to be replaced with "y" helper function.
Supported Autofix for the following: strings.SplitN(s, ".", -1) => strings.Split(s, ".") strings.Map(unicode.ToTitle, s) => strings.ToTitle(s) strings.Replace(s, "a", "b", -1) => strings.ReplaceAll(s, "a", "b") bytes.SplitN(b, []byte("."), -1) => bytes.Split(b, []byte(".")) bytes.Map(unicode.ToUpper, b) => bytes.ToUpper(b) bytes.Map(unicode.ToLower, b) => bytes.ToLower(b) bytes.Map(unicode.ToTitle, b) => bytes.ToTitle(b) bytes.Replace(b, b, b, -1) => bytes.ReplaceAll(b, b, b) http.HandlerFunc(http.NotFound) => http.NotFoundHandler() draw.DrawMask(i, r, i, p, nil, image.Point{}, o) => draw.Draw(i, r, i, p, o)
wg.Add(1)
// some code
wg.Add(-1)
wg.Add(1)
// some code
wg.Done()
strings.SplitN(str, splitChar, -1)
strings.Split(str, splitChar)
http.HandlerFunc("/non-existent", http404)
http.NotFoundHandler("/non-existent")