about summary refs log tree commit diff stats
path: root/internal/config/fetcher.go
diff options
context:
space:
mode:
authorAlan Pearce2025-03-12 22:39:51 +0100
committerAlan Pearce2025-03-12 22:39:51 +0100
commit9015baf955c94a806c01b3dcd5648c8e68ad2685 (patch)
tree5f59386c2ab31b6e45b85576e45a1fc8ae448ae0 /internal/config/fetcher.go
parent7bb77ff5729cc9434afee895a470fd3b4c12e6d1 (diff)
downloadsearchix-9015baf955c94a806c01b3dcd5648c8e68ad2685.tar.lz
searchix-9015baf955c94a806c01b3dcd5648c8e68ad2685.tar.zst
searchix-9015baf955c94a806c01b3dcd5648c8e68ad2685.zip
refactor: ensure errors have stack traces HEAD main
Diffstat (limited to 'internal/config/fetcher.go')
-rw-r--r--internal/config/fetcher.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/config/fetcher.go b/internal/config/fetcher.go
index fd95b32..fca6cb1 100644
--- a/internal/config/fetcher.go
+++ b/internal/config/fetcher.go
@@ -4,6 +4,7 @@ import (
 	"fmt"
 
 	"github.com/stoewer/go-strcase"
+	"gitlab.com/tozd/go/errors"
 )
 
 type Fetcher int
@@ -37,7 +38,7 @@ func ParseFetcher(name string) (Fetcher, error) {
 	case "download":
 		return Download, nil
 	default:
-		return UnknownFetcher, fmt.Errorf("unsupported fetcher %s", name)
+		return UnknownFetcher, errors.Errorf("unsupported fetcher %s", name)
 	}
 }