about summary refs log tree commit diff stats
path: root/internal
diff options
context:
space:
mode:
authorAlan Pearce2024-05-12 21:29:22 +0200
committerAlan Pearce2024-05-12 21:34:57 +0200
commit53c9fb2f72cbc82177404b76a4aad14283f8ced1 (patch)
tree2f0c69c25a8a2c08f34ef5db735b02fe51c4c58b /internal
parentf24c5b0a9901cc91967ed83bc4a015bd0b2c3d4d (diff)
downloadsearchix-53c9fb2f72cbc82177404b76a4aad14283f8ced1.tar.lz
searchix-53c9fb2f72cbc82177404b76a4aad14283f8ced1.tar.zst
searchix-53c9fb2f72cbc82177404b76a4aad14283f8ced1.zip
fix: don't panic on TOML decode error
Diffstat (limited to 'internal')
-rw-r--r--internal/config/config.go2
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())
 			}