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
package main import ( "flag" "fmt" "os" "github.com/zeromicro/go-zero/core/conf" ) type Config struct { User []string `json:"user,default=abc,env=USER"` } func main() { os.Setenv("USER", "abc") var c3 Config err := conf.FillDefault(&c3) fmt.Println(c3, err) // {[]} type mismatch for field "user", expect "slice", actual "number" }
if not set env, it works fine when set env it return err how to set slice value in env
The text was updated successfully, but these errors were encountered:
I think more examples should be added to the config documentation
Sorry, something went wrong.
kevwan
No branches or pull requests
if not set env, it works fine
when set env it return err
how to set slice value in env
The text was updated successfully, but these errors were encountered: