about summary refs log tree commit diff stats
path: root/internal/importer/utils.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/importer/utils.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/importer/utils.go')
-rw-r--r--internal/importer/utils.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/importer/utils.go b/internal/importer/utils.go
index da10735..0ca6890 100644
--- a/internal/importer/utils.go
+++ b/internal/importer/utils.go
@@ -10,7 +10,7 @@ import (
 	"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 @@ func ValueTypeToString(valueType jstream.ValueType) string {
 	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 makeRepoURL(repo config.Repository, subPath string, line string) (string, e
 	}
 }
 
-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 @@ func MakeChannelLink(repo config.Repository, subPath string) (*nix.Link, error)
 	}, 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