-
Notifications
You must be signed in to change notification settings - Fork 2
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
Prepare for v0.1.0 release #43
Conversation
2e16dbf
to
11ff1de
Compare
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.
Nice 👍
I also already thought about this change 🚀
I just have one nitpicking comment for renaming a function.
internal/common/common.go
Outdated
@@ -12,6 +12,10 @@ func HdrValueAuthorization(key string) string { | |||
return "Bearer " + key | |||
} | |||
|
|||
func BasePath(server string) string { |
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.
This is not a path 🤔
This is a full URI what we return here.
Given that the server
string is a valid URL 🙃
We can improve this later by checking this for an valid URL 👍
However, for now I just want to rename it.
Something like ServerApiUrl
? 🤔 Or something... Path feels wrong here...
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.
Well first of all too much checking and validations obscure the business logic. IMO it should be the responsibility of the user to make sure httttttp://he/is/not/passing/invalid/url
😄 . This aligns with our goal of keeping our API and CLI as just thin wrappers.
But yes the function name is not apt but then IMO the new name BaseURL
is more apt because we will be extending
it.
The `client.New()` now takes just the outline api server URL and creates base path internally freeing user from the burden of crafting proper base path. The change is also reflected in the `cli` where we also simplify global flags to `--server` and `--key`. Update README accordingly.
11ff1de
to
8539c92
Compare
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.
Still LGTM 👌
The
client.New()
now takes just the outline api server URL and creates base path internally freeing user from the burden of crafting proper base path.The change is also reflected in the
cli
where we also simplify global flags to--server
and--key
.Updated README accordingly.