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