Skip to content

Commit

Permalink
style: Use fmt.Errorf
Browse files Browse the repository at this point in the history
  • Loading branch information
sh0rez committed Feb 26, 2021
1 parent 2c8283f commit adbebcb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/jsonnet/imports.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package jsonnet

import (
"fmt"
"io/ioutil"
"path/filepath"
"sort"
Expand Down Expand Up @@ -92,7 +93,7 @@ func importRecursive(list map[string]bool, vm *jsonnet.VM, node ast.Node, curren

contents, foundAt, err := vm.ImportAST(currentPath, p)
if err != nil {
return errors.Wrapf(err, "importing %s from %s", p, currentPath)
return fmt.Errorf("importing '%s' from '%s': %w", p, currentPath, err)
}

abs, _ := filepath.Abs(foundAt)
Expand Down

0 comments on commit adbebcb

Please sign in to comment.