Skip to content
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

Merged
merged 1 commit into from
Aug 12, 2023
Merged

Prepare for v0.1.0 release #43

merged 1 commit into from
Aug 12, 2023

Conversation

rsjethani
Copy link
Collaborator

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.

@rsjethani rsjethani linked an issue Aug 9, 2023 that may be closed by this pull request
@rsjethani rsjethani marked this pull request as ready for review August 9, 2023 23:20
@rsjethani rsjethani marked this pull request as draft August 9, 2023 23:21
@rsjethani rsjethani force-pushed the 36-prepare-for-v010-release branch 3 times, most recently from 2e16dbf to 11ff1de Compare August 9, 2023 23:31
@rsjethani rsjethani marked this pull request as ready for review August 9, 2023 23:33
@rsjethani rsjethani requested a review from StefMa August 9, 2023 23:33
@rsjethani rsjethani self-assigned this Aug 9, 2023
StefMa
StefMa previously approved these changes Aug 11, 2023
Copy link
Collaborator

@StefMa StefMa left a 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.

@@ -12,6 +12,10 @@ func HdrValueAuthorization(key string) string {
return "Bearer " + key
}

func BasePath(server string) string {
Copy link
Collaborator

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...

Copy link
Collaborator Author

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.
Copy link
Collaborator

@StefMa StefMa left a comment

Choose a reason for hiding this comment

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

Still LGTM 👌

@rsjethani rsjethani merged commit e73af9c into main Aug 12, 2023
3 checks passed
@rsjethani rsjethani deleted the 36-prepare-for-v010-release branch August 12, 2023 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prepare for v0.1.0 release
2 participants