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/options.gointernal/importer/options.go
@@ -11,7 +11,7 @@ "go.alanpearce.eu/x/log"
"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 @@
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()