Closed egorlepa closed 2 years ago
fixed with #13
Is there a release pending for this fix?
@fredrikjacobson published a release for the fix https://github.com/gurkankaymak/hocon/releases/tag/v1.2.4
@fredrikjacobson published a release for the fix https://github.com/gurkankaymak/hocon/releases/tag/v1.2.4
Thanks!
When trying it out it looks like there some issue happening when used in conjunction with withFallback
. God null reference error when doing that
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x14d7e30]
goroutine 1 [running]:
github.com/gurkankaymak/hocon.mergeObjects(0x15c78c0, 0xc00035fa60)
/Users/fredrikjacobson/go/pkg/mod/github.com/gurkankaymak/hocon@v1.2.4/parser.go:376 +0xd0
github.com/gurkankaymak/hocon.mergeObjects(0x100c027, 0x14)
/Users/fredrikjacobson/go/pkg/mod/github.com/gurkankaymak/hocon@v1.2.4/parser.go:378 +0x135
github.com/gurkankaymak/hocon.(*Config).WithFallback(0xc0000285d0, 0xf)
/Users/fredrikjacobson/go/pkg/mod/github.com/gurkankaymak/hocon@v1.2.4/config.go:266 +0x57
hi @fredrikjacobson, this should be the same case with #15 , it is fixed with the latest commit, if you are still getting this error please provide a sample config
Yes that did the trick for using withFallback
.
https://github.com/lightbend/config#optional-system-or-env-variable-overrides Override feature is not implemented.
CASE 1
config.GetString("go.path") // returns /Users/egorlepa/go as it should
CASE 2
config.GetString("go.path") // returns ${?NON_EXISTENT_ENV}
Case 2 should return /whatever/whatever, because: