-
Notifications
You must be signed in to change notification settings - Fork 13
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
Refactor osdns to avoid using custom linker flags in common situations #903
Conversation
bd09877
to
d562bcb
Compare
Fixes #895 |
dns_dnshack.go
Outdated
|
||
func (c *DNSConfig) Apply() error { | ||
return dnshack.Configure(c.Servers, c.Timeout, c.RoundRobin) | ||
} |
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.
nit: add endl
Maybe not |
At first I did not want to add it at all here. But it turns out I needed to add them to avoid go test with linker flag. I'd add the build tag everywhere for consistency. |
Do not call osdns directly - use forwarder.DNSConfig::Apply() instead. Refactor osdns::Configure() signature to avoid dependency loop. Hide Apply() implementation by dnshack build tag. Require tag to run dnshack tests.
This reverts commit 382ab5b.
Restore elements of previous commit.
d562bcb
to
770e09d
Compare
Added new line and build tags to all files. |
LGTM |
Rename osdns to dnshack and require dnshack build tag to use it.
This allows to use standard, unmodified Go build chain at the expense of not using custom DNS parameters in dev builds.