Skip to content

Commit

Permalink
refactor: use xerrors instead of fmt
Browse files Browse the repository at this point in the history
Signed-off-by: nikpivkin <nikita.pivkin@smartforce.io>
  • Loading branch information
nikpivkin committed Dec 21, 2024
1 parent a45fc4d commit d1e2450
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/dependency/parser/python/pyproject/pyproject.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package pyproject

import (
"fmt"
"io"

"github.com/BurntSushi/toml"
Expand Down Expand Up @@ -33,7 +32,7 @@ type dependencies map[string]struct{}
func (d *dependencies) UnmarshalTOML(data any) error {
m, ok := data.(map[string]any)
if !ok {
return fmt.Errorf("dependencies must be map, but got: %T", data)
return xerrors.Errorf("dependencies must be map, but got: %T", data)
}

*d = lo.MapEntries(m, func(pkgName string, _ any) (string, struct{}) {
Expand Down

0 comments on commit d1e2450

Please sign in to comment.