Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Commit

Permalink
S1003: should use strings.ContainsRune(" \t\r\n", rune(c)) instead (g…
Browse files Browse the repository at this point in the history
…osimple)
  • Loading branch information
Edward Muller committed Sep 9, 2019
1 parent c7b441c commit 7f09935
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions registry/authchallenge.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ func init() {
var t octetType
isCtl := c <= 31 || c == 127
isChar := 0 <= c && c <= 127
isSeparator := strings.IndexRune(" \t\"(),/:;<=>?@[]\\{}", rune(c)) >= 0
if strings.IndexRune(" \t\r\n", rune(c)) >= 0 {
isSeparator := strings.ContainsRune(" \t\"(),/:;<=>?@[]\\{}", rune(c))
if strings.ContainsRune(" \t\r\n", rune(c)) {
t |= isSpace
}
if isChar && !isCtl && !isSeparator {
Expand Down

0 comments on commit 7f09935

Please sign in to comment.