libct/keys: stop using pkg/errors

Use fmt.Errorf with %w instead.

Convert the users to the new wrapping.

This fixes an errorlint warning.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin
2021-06-08 20:59:05 -07:00
parent adbac31d88
commit c6fed264da
3 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -3,11 +3,11 @@
package keys
import (
"errors"
"fmt"
"strconv"
"strings"
"github.com/pkg/errors"
"golang.org/x/sys/unix"
)
@@ -16,7 +16,7 @@ type KeySerial uint32
func JoinSessionKeyring(name string) (KeySerial, error) {
sessKeyID, err := unix.KeyctlJoinSessionKeyring(name)
if err != nil {
return 0, errors.Wrap(err, "create session key")
return 0, fmt.Errorf("unable to create session key: %w", err)
}
return KeySerial(sessKeyID), nil
}