Skip to content

feat: expose owner_name in coder_workspace resource #11639

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

Merged
merged 18 commits into from
Jan 17, 2024
Prev Previous commit
Fix strings.TrimSpace
  • Loading branch information
mtojek committed Jan 17, 2024
commit 2bc609e359a9af11342068061ff04eb391740ec7
3 changes: 1 addition & 2 deletions coderd/httpapi/name.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ func UserRealNameValid(str string) error {
return xerrors.New("must be <= 128 characters")
}

trimmed := strings.TrimSpace(str)
if trimmed != str {
if strings.TrimSpace(str) != str {
return xerrors.New("must not have leading or trailing white spaces")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happened to catch my eye, whitespace is uncountable, so we drop s. Alt: whitespace characterS.

Suggested change
return xerrors.New("must not have leading or trailing white spaces")
return xerrors.New("must not have leading or trailing whitespace")

Not sure about having white space in whitespace, though. Both could be correct 😄.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}
return nil
Expand Down