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 ( "os" "github.com/jinzhu/configor" ) type Config struct { Enabled *bool `default:"false"` } func main() { os.Setenv("ENV_ENABLED", "false") c := Config{} configor.New(&configor.Config{ENVPrefix: "ENV"}).Load(&c) }
Panics with
panic: reflect.Set: value of type bool is not assignable to type *bool goroutine 1 [running]: reflect.Value.assignTo({0x5480a0?, 0x67c7e0?, 0xb?}, {0x5700af, 0xb}, 0x5436a0, 0x0) /usr/lib/go/src/reflect/value.go:3358 +0x299 reflect.Value.Set({0x5436a0?, 0xc000070058?, 0x2?}, {0x5480a0?, 0x67c7e0?, 0x5436a0?}) /usr/lib/go/src/reflect/value.go:2313 +0xe6 github.com/jinzhu/configor.(*Configor).processTags(0xc0000141a0, {0x542fa0?, 0xc000070058?}, {0xc0000141e0, 0x1, 0x1}) /home/jm/go/pkg/mod/github.com/jinzhu/[email protected]/utils.go:305 +0xb88 github.com/jinzhu/configor.(*Configor).load(0xc0000141a0, {0x542fa0, 0xc000070058}, 0x0, {0x0?, 0xc0000b3ed0?, 0x40d205?}) /home/jm/go/pkg/mod/github.com/jinzhu/[email protected]/utils.go:415 +0x3f8 github.com/jinzhu/configor.(*Configor).Load(0xc0000141a0, {0x542fa0, 0xc000070058}, {0x0, 0x0, 0x0}) /home/jm/go/pkg/mod/github.com/jinzhu/[email protected]/configor.go:92 +0x13c main.main() /tmp/test/main.go:17 +0x7d
The text was updated successfully, but these errors were encountered:
jinzhu
No branches or pull requests
Reproducible Example
Description
Panics with
The text was updated successfully, but these errors were encountered: