diff options
author | Alan Pearce | 2025-03-12 22:39:51 +0100 |
---|---|---|
committer | Alan Pearce | 2025-03-12 22:39:51 +0100 |
commit | 9015baf955c94a806c01b3dcd5648c8e68ad2685 (patch) | |
tree | 5f59386c2ab31b6e45b85576e45a1fc8ae448ae0 /internal/importer/options.go | |
parent | 7bb77ff5729cc9434afee895a470fd3b4c12e6d1 (diff) | |
download | searchix-9015baf955c94a806c01b3dcd5648c8e68ad2685.tar.lz searchix-9015baf955c94a806c01b3dcd5648c8e68ad2685.tar.zst searchix-9015baf955c94a806c01b3dcd5648c8e68ad2685.zip |
refactor: ensure errors have stack traces
Diffstat (limited to 'internal/importer/options.go')
-rw-r--r-- | internal/importer/options.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/importer/options.go b/internal/importer/options.go index 763f57f..a586a3f 100644 --- a/internal/importer/options.go +++ b/internal/importer/options.go @@ -11,7 +11,7 @@ import ( "github.com/bcicen/jstream" "github.com/mitchellh/mapstructure" - "github.com/pkg/errors" + "gitlab.com/tozd/go/errors" ) type nixValueJSON struct { @@ -68,7 +68,7 @@ func NewOptionProcessor( infile io.ReadCloser, source *config.Source, log *log.Logger, -) (*OptionIngester, error) { +) (*OptionIngester, errors.E) { i := OptionIngester{ dec: jstream.NewDecoder(infile, 1).EmitKV(), log: log, @@ -94,9 +94,9 @@ func NewOptionProcessor( return &i, nil } -func (i *OptionIngester) Process(ctx context.Context) (<-chan nix.Importable, <-chan error) { +func (i *OptionIngester) Process(ctx context.Context) (<-chan nix.Importable, <-chan errors.E) { results := make(chan nix.Importable) - errs := make(chan error) + errs := make(chan errors.E) go func() { defer i.infile.Close() |