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
fix: builtin func refactor for github #25
base: main
Are you sure you want to change the base?
Conversation
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.
Looks mostly good to me, just left a few comments.
func buildRequestUrl(path string, data map[string]any) (string, error) { | ||
pathParams := parsePathParams(path) | ||
|
||
if len(pathParams) != 0 { |
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 believe this condition is not necessary. If pathParams
is empty the for
isn't executed anyway.
u.RawQuery = qs.Encode() | ||
|
||
return r.Client.NewRequest(method, u.String(), nil) | ||
return u.String(), err |
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 think it's better to return nil
here instead of err
. Telling explicitly there was no error (err
can have a value that we handled and we'd be returning it anyway).
} | ||
} | ||
|
||
//Testing request path strings to url request |
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.
Missed the space between the //
and comment.
interface{}
toany
in the changed files