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

(Some) getter methods do not appear to return intended default values #108

Closed
atc0005 opened this issue Sep 16, 2020 · 0 comments · Fixed by #114
Closed

(Some) getter methods do not appear to return intended default values #108

atc0005 opened this issue Sep 16, 2020 · 0 comments · Fixed by #114
Assignees
Labels
bug Something isn't working config
Milestone

Comments

@atc0005
Copy link
Owner

atc0005 commented Sep 16, 2020

Example:

dnsc/config/getters.go

Lines 31 to 43 in e2fb9f2

// Query returns the user-provided DNS server query or empty string if DNS
// server query was not provided. CLI flag values take precedence if provided.
func (c Config) Query() string {
switch {
case c.cliConfig.Query != "":
return c.cliConfig.Query
case c.fileConfig.Query != "":
return c.fileConfig.Query
default:
return ""
}
}

defaultQueryType string = "A"

I'm thinking that I must have changed the design part way through and didn't go back and sync the behavior.

@atc0005 atc0005 added bug Something isn't working config labels Sep 16, 2020
@atc0005 atc0005 added this to the Future milestone Sep 16, 2020
@atc0005 atc0005 self-assigned this Sep 16, 2020
@atc0005 atc0005 pinned this issue Sep 16, 2020
atc0005 added a commit to atc0005/go-lockss that referenced this issue Oct 9, 2020
- add missing default value const for config server url
- actually *use* default value consts for log level, format

refs #39
refs atc0005/dnsc#108
atc0005 added a commit to atc0005/go-lockss that referenced this issue Oct 9, 2020
- add missing default value const for config server url
- actually *use* default value consts for log level, format

refs #39
refs atc0005/dnsc#108
@atc0005 atc0005 modified the milestones: Future, Next Release Oct 10, 2020
atc0005 added a commit that referenced this issue Oct 10, 2020
- add missing default value consts
- actually *use* default value consts

refs #108
refs atc0005/go-lockss#39
@atc0005 atc0005 unpinned this issue Oct 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working config
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant