Skip to content

Commit 2bc609e

Browse files
committed
Fix strings.TrimSpace
1 parent d116566 commit 2bc609e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

coderd/httpapi/name.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ func UserRealNameValid(str string) error {
8686
return xerrors.New("must be <= 128 characters")
8787
}
8888

89-
trimmed := strings.TrimSpace(str)
90-
if trimmed != str {
89+
if strings.TrimSpace(str) != str {
9190
return xerrors.New("must not have leading or trailing white spaces")
9291
}
9392
return nil

0 commit comments

Comments
 (0)