mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
all: use %w instead of %v to wrap errors (#1275)
* all: use %w instead of %v for nested errors with fmt.Errorf * all: update generated code to use %w instead of %v for error wrapping
This commit is contained in:
committed by
GitHub
parent
51d19b8e5b
commit
c53b45ddb0
@@ -38,7 +38,7 @@ func PkgPath(config *packages.Config, target string) (string, error) {
|
||||
for i := 0; i < 2; i++ {
|
||||
pkgs, err := packages.Load(config, pathCheck)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("load package info: %v", err)
|
||||
return "", fmt.Errorf("load package info: %w", err)
|
||||
}
|
||||
if len(pkgs) == 0 || len(pkgs[0].Errors) != 0 {
|
||||
parts = append(parts, filepath.Base(pathCheck))
|
||||
|
||||
Reference in New Issue
Block a user