Refactor osdns to avoid using custom linker flags in common situations#903
Merged
Refactor osdns to avoid using custom linker flags in common situations#903
Conversation
bd09877 to
d562bcb
Compare
Contributor
Author
|
Fixes #895 |
budziam
approved these changes
Sep 10, 2024
Choraden
reviewed
Sep 11, 2024
dns_dnshack.go
Outdated
|
|
||
| func (c *DNSConfig) Apply() error { | ||
| return dnshack.Configure(c.Servers, c.Timeout, c.RoundRobin) | ||
| } No newline at end of file |
Contributor
|
Maybe not |
Choraden
approved these changes
Sep 11, 2024
Contributor
Author
|
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
Contributor
Author
|
Added new line and build tags to all files. |
Contributor
|
LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.