We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
type Option struct { Test string `config:"test"` } func TestConfig(t *testing.T) { var opt Option opt.Test = "test" con := config.New("test", func(opt *config.Options) { opt.DecoderConfig.TagName = "config" opt.ParseDefault = true }) con.AddDriver(yaml.Driver) err := con.BindStruct("", &opt) var buf bytes.Buffer _, err = con.DumpTo(&buf, config.Yaml) if err != nil { return } fmt.Println(buf.String()) }
这段代码不生效, buf中没有任何数据.
如果可以, 是否可以提供一组更方便的api, 例如:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
这段代码不生效, buf中没有任何数据.
如果可以, 是否可以提供一组更方便的api, 例如:
The text was updated successfully, but these errors were encountered: