-
Notifications
You must be signed in to change notification settings - Fork 875
feat: filter users by github user id in the users list CLI command #17029
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
Changes from all commits
ab3d254
2e96d64
5394f26
4318781
1f2b078
d08dd3b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,6 +82,20 @@ func (p *QueryParamParser) Int(vals url.Values, def int, queryParam string) int | |
return v | ||
} | ||
|
||
func (p *QueryParamParser) Int64(vals url.Values, def int64, queryParam string) int64 { | ||
v, err := parseQueryParam(p, vals, func(v string) (int64, error) { | ||
return strconv.ParseInt(v, 10, 64) | ||
}, def, queryParam) | ||
if err != nil { | ||
p.Errors = append(p.Errors, codersdk.ValidationError{ | ||
Field: queryParam, | ||
Detail: fmt.Sprintf("Query param %q must be a valid 64-bit integer: %s", queryParam, err.Error()), | ||
}) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: explicitly return the zero value here |
||
return 0 | ||
} | ||
return v | ||
} | ||
|
||
// PositiveInt32 function checks if the given value is 32-bit and positive. | ||
// | ||
// We can't use `uint32` as the value must be within the range <0,2147483647> | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is worth blocking on, but the comment for this column mentions:
It may be worth updating this comment in a follow-up now that it's becoming more of a load-bearing number.