I was testing some code that utilizes the MustGetString function, but was confused when the tests were failing when I was asserting a panic to happen.
I dug into the code and found that it doesn't actually panic, but calls log.Fatal through your ErrorHandler. It would have saved me a lot of time if I knew this from the function's documentation.
I can make the changes myself, but I wanted to see if I am incorrect in my thinking that the documentation is inaccurate first.
Current Documentation:
MustGetString returns the expanded value for the given key if exists or panics otherwise.
Proposed Change:
MustGetString returns the expanded value for the given key if exists or calls log.Fatal otherwise.
Just found out that you can manually set the ErrorHandler to panic instead of calling log.Fatal. Guess I should RTFM before posting issues, sorry about that...
Hello everyone.
I was testing some code that utilizes the MustGetString function, but was confused when the tests were failing when I was asserting a panic to happen.
I dug into the code and found that it doesn't actually panic, but calls log.Fatal through your ErrorHandler. It would have saved me a lot of time if I knew this from the function's documentation.
I can make the changes myself, but I wanted to see if I am incorrect in my thinking that the documentation is inaccurate first.
Current Documentation: MustGetString returns the expanded value for the given key if exists or panics otherwise.
Proposed Change: MustGetString returns the expanded value for the given key if exists or calls log.Fatal otherwise.