fix: don't panic on TOML decode error
Alan Pearce alan@alanpearce.eu
Sun, 12 May 2024 21:29:22 +0200
1 files changed, 1 insertions(+), 1 deletions(-)
jump to
M internal/config/config.go → internal/config/config.go
@@ -109,7 +109,7 @@ dec := toml.NewDecoder(f) err = dec.Decode(&config) if err != nil { - var tomlError toml.DecodeError + var tomlError *toml.DecodeError if errors.As(err, &tomlError) { return nil, errors.WithMessage(err, tomlError.Error()) }