mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user