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(+), 4 deletions(-)

changed files
M internal/importer/utils.gointernal/importer/utils.go
@@ -10,7 +10,7 @@ "go.alanpearce.eu/searchix/internal/config"
"go.alanpearce.eu/searchix/internal/nix" "github.com/bcicen/jstream" - "github.com/pkg/errors" + "gitlab.com/tozd/go/errors" ) func ValueTypeToString(valueType jstream.ValueType) string {
@@ -34,7 +34,7 @@
return "very strange" } -func makeRepoURL(repo config.Repository, subPath string, line string) (string, error) { +func makeRepoURL(repo config.Repository, subPath string, line string) (string, errors.E) { switch repo.Type { case config.GitHub: ref := repo.Revision
@@ -55,7 +55,7 @@ )
} } -func MakeChannelLink(repo config.Repository, subPath string) (*nix.Link, error) { +func MakeChannelLink(repo config.Repository, subPath string) (*nix.Link, errors.E) { url, err := makeRepoURL(repo, subPath, "") if err != nil { return nil, err
@@ -67,7 +67,7 @@ URL: url,
}, nil } -func setRepoRevision(file io.ReadCloser, source *config.Source) error { +func setRepoRevision(file io.ReadCloser, source *config.Source) errors.E { if file != nil { defer file.Close() var str strings.Builder