about summary refs log tree commit diff stats
path: root/internal/config/repository.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/repository.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/repository.go')
-rw-r--r--internal/config/repository.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/internal/config/repository.go b/internal/config/repository.go
index a074cbc..52b255e 100644
--- a/internal/config/repository.go
+++ b/internal/config/repository.go
@@ -3,6 +3,8 @@ package config
 import (
 	"fmt"
 	"strings"
+
+	"gitlab.com/tozd/go/errors"
 )
 
 type RepoType int
@@ -28,12 +30,12 @@ func (f RepoType) String() string {
 	}
 }
 
-func parseRepoType(name string) (RepoType, error) {
+func parseRepoType(name string) (RepoType, errors.E) {
 	switch strings.ToLower(name) {
 	case "github":
 		return GitHub, nil
 	default:
-		return UnknownRepoType, fmt.Errorf("unsupported repo type %s", name)
+		return UnknownRepoType, errors.Errorf("unsupported repo type %s", name)
 	}
 }