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

allow custom user-agents #6

Merged
merged 2 commits into from
Oct 2, 2020
Merged

Conversation

1jz
Copy link
Contributor

@1jz 1jz commented Oct 2, 2020

Add feature requested in #7

@tonyvugithub
Copy link
Owner

@1jz : hi Phillip, great contribution as always. Can you make a little adjustment to your PR for me?
In linkDetector.go
can you change line 61-64 from this

var userAgent string
checkCmd.StringVar(&userAgent, "u", "Go-http-client/1.1", "custom user-agent")

to this:
userAgent := checkCmd.String("u", ""Go-http-client/1.1", "custom user-agent")

I want to keep it consistent with the other flags. I think String() would return a pointer to the string flag which is basically what you have tried to pass in in StringVar(). Thank you. Update it and I merge it in.

@tonyvugithub tonyvugithub linked an issue Oct 2, 2020 that may be closed by this pull request
@tonyvugithub tonyvugithub merged commit fd96f2f into tonyvugithub:master Oct 2, 2020
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.

Allow custom User-Agents
2 participants