diff options
author | Alan Pearce | 2024-05-12 21:29:22 +0200 |
---|---|---|
committer | Alan Pearce | 2024-05-12 21:34:57 +0200 |
commit | 53c9fb2f72cbc82177404b76a4aad14283f8ced1 (patch) | |
tree | 2f0c69c25a8a2c08f34ef5db735b02fe51c4c58b | |
parent | f24c5b0a9901cc91967ed83bc4a015bd0b2c3d4d (diff) | |
download | searchix-53c9fb2f72cbc82177404b76a4aad14283f8ced1.tar.lz searchix-53c9fb2f72cbc82177404b76a4aad14283f8ced1.tar.zst searchix-53c9fb2f72cbc82177404b76a4aad14283f8ced1.zip |
fix: don't panic on TOML decode error
-rw-r--r-- | internal/config/config.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index ff21a54..55f5efa 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -109,7 +109,7 @@ func GetConfig(filename string) (*Config, error) { 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()) } |