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

Config: add WithUserAgent config option. #29

Merged
merged 2 commits into from
Oct 30, 2017
Merged

Conversation

jelmersnoeck
Copy link
Contributor

This adds the option to add a custom UserAgent to the client as well as
initializing a default UserAgent. This allows people to use tracking to see
how much the specific client is hitting their API.

The UserAgent will be in the format of go-manifold-$version ($custom).

@jelmersnoeck jelmersnoeck self-assigned this Oct 30, 2017
@jelmersnoeck
Copy link
Contributor Author

@jbowes I'm not sure how we want to approach the Version updates? Usually, when we have a tool that needs to be built - like our CLIs - we update it on build time. Seeing that this package should be vendored, we can't do that.

I was thinking of a make target, VERSION=0.8.4 make tag which would rewrite the Version to the specified one, commit the file and add a new tag.

Thoughts?

This adds the option to add a custom UserAgent to the client as well as
initializing a default UserAgent. This allows people to use tracking to
see how much the specific client is hitting their API.

The UserAgent will be in the format of `go-manifold-$version ($custom)`.
@jbowes
Copy link
Member

jbowes commented Oct 30, 2017

Thoughts?

👍

@jbowes
Copy link
Member

jbowes commented Oct 30, 2017

This looks great! My only nitpick is to make sure to include a v at the start of the tag, to match our other repos. Leaving it off of the reported version is fine (and preferred)

@jbowes
Copy link
Member

jbowes commented Oct 30, 2017

approved. feel free to to the makefile target here or in another pr.

@jelmersnoeck
Copy link
Contributor Author

I'll add it in another PR.

@jelmersnoeck jelmersnoeck merged commit 58d1a3d into master Oct 30, 2017
@jelmersnoeck jelmersnoeck deleted the jelmer-user-agent branch October 30, 2017 12:16
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.

2 participants