fixed dependencies

This commit is contained in:
nuknal
2024-10-24 15:46:01 +08:00
parent d16a5bd9c0
commit 1161e8d054
2005 changed files with 690883 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
//go:build strftime_native_errors
// +build strftime_native_errors
package errors
import "fmt"
func New(s string) error {
return fmt.Errorf(s)
}
func Errorf(s string, args ...interface{}) error {
return fmt.Errorf(s, args...)
}
func Wrap(err error, s string) error {
return fmt.Errorf(s+`: %w`, err)
}

View File

@@ -0,0 +1,18 @@
//go:build !strftime_native_errors
// +build !strftime_native_errors
package errors
import "github.com/pkg/errors"
func New(s string) error {
return errors.New(s)
}
func Errorf(s string, args ...interface{}) error {
return errors.Errorf(s, args...)
}
func Wrap(err error, s string) error {
return errors.Wrap(err, s)
}