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

fix(basicflag): option not apply #322

Merged
merged 1 commit into from
Sep 23, 2024
Merged

Conversation

qianlongzt
Copy link
Contributor

@qianlongzt qianlongzt commented Sep 20, 2024

ProviderWithValue and Provider API not compatible, I can't reuse function. I have to copy test.

fix: #320

option1: make break change to api
option2: drop support for default vaule, no long need pass koanf instances. more like other providers.

@qianlongzt
Copy link
Contributor Author

default vaule can just use go struct

var config *Config = &Config{
    Port: "8989",
}

type Config struct {
    Port string 
}

k.UnmarshalWithConf("", config, koanf.UnmarshalConf{Tag: "tag"})

@knadh knadh merged commit 09fd5db into knadh:master Sep 23, 2024
4 checks passed
@qianlongzt qianlongzt deleted the fix-basicflag branch September 23, 2024 18:35
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.

providers/basicflag should not output a value when the user has not set it
2 participants