refactor: ensure errors have stack traces
1 file changed, 4 insertions(+), 4 deletions(-)
changed files
M internal/importer/utils.go → internal/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