all repos — searchix @ 9015baf955c94a806c01b3dcd5648c8e68ad2685

Search engine for NixOS, nix-darwin, home-manager and NUR users

refactor: ensure errors have stack traces

Alan Pearce
commit

9015baf955c94a806c01b3dcd5648c8e68ad2685

parent

7bb77ff5729cc9434afee895a470fd3b4c12e6d1

1 file changed, 4 insertions(+), 2 deletions(-)

changed files
M internal/config/repository.gointernal/config/repository.go
@@ -3,6 +3,8 @@
import ( "fmt" "strings" + + "gitlab.com/tozd/go/errors" ) type RepoType int
@@ -28,12 +30,12 @@ return fmt.Sprintf("RepoType(%d)", f)
} } -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) } }