From 9015baf955c94a806c01b3dcd5648c8e68ad2685 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 12 Mar 2025 22:39:51 +0100 Subject: refactor: ensure errors have stack traces --- internal/config/repository.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'internal/config/repository.go') 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) } } -- cgit 1.4.1