Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove pkg dependency #731

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions errors/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,20 @@ package errors

import (
"errors"

pkg_errors "github.com/pkg/errors"
"fmt"
)

// Prefix is the default error string prefix
const Prefix = "opcua: "

// Errorf wraps github.com/pig/errors#Errorf`
// Errorf wraps fmt.Errorf
func Errorf(format string, a ...interface{}) error {
return pkg_errors.Errorf(Prefix+format, a...)
return fmt.Errorf(Prefix+format, a...)
}

// New wraps github.com/pkg/errors#New
// New wraps errors.New
func New(text string) error {
return pkg_errors.New(Prefix + text)
return errors.New(Prefix + text)
}

// Is wraps errors.Is
Expand Down
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ go 1.20

require (
github.com/pascaldekloe/goe v0.1.1
github.com/pkg/errors v0.9.1
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1
golang.org/x/term v0.8.0
)
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
github.com/pascaldekloe/goe v0.1.1 h1:Ah6WQ56rZONR3RW3qWa2NCZ6JAVvSpUcoLBaOmYFt9Q=
github.com/pascaldekloe/goe v0.1.1/go.mod h1:KSyfaxQOh0HZPjDP1FL/kFtbqYqrALJTaMafFUIccqU=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc=
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w=
golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU=
Expand Down
Loading