From 3fd29f3e1c963196cac69fcbb9d68116f7ea80ec Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Tue, 6 Feb 2024 14:43:06 +0100 Subject: All: Prepare to get rid of go-errors/errors lib --- internal/util/util.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'internal/util') diff --git a/internal/util/util.go b/internal/util/util.go index ebda183..85c4b37 100644 --- a/internal/util/util.go +++ b/internal/util/util.go @@ -7,8 +7,6 @@ import ( "net/url" "os" "strings" - - "github.com/go-errors/errors" ) // MakeRandomByteSlice creates a cryptographically random bytes slice of `size` @@ -26,7 +24,7 @@ func EnsureDirectory(dir string) error { // Create with 700 permissions, read, write, execute only for the owner err := os.MkdirAll(dir, 0o700) if err != nil { - return errors.WrapPrefix(err, fmt.Sprintf("failed to create directory '%s'", dir), 0) + return fmt.Errorf("failed to create directory '%s' with error: %w", dir, err) } return nil } -- cgit v1.2.3