From ef2fc90f2d0057bfddee1b83d307e853181a4988 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Thu, 11 Feb 2021 14:15:26 +0100 Subject: Enable stylecheck linter Use the stylecheck linter and fix the reported problems. [NO TESTS NEEDED] Signed-off-by: Paul Holzinger --- pkg/rootless/rootless.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'pkg/rootless') diff --git a/pkg/rootless/rootless.go b/pkg/rootless/rootless.go index df35c0d6b..b5538efc3 100644 --- a/pkg/rootless/rootless.go +++ b/pkg/rootless/rootless.go @@ -61,9 +61,9 @@ var ( gidMapOnce sync.Once ) -// GetAvailableUidMap returns the UID mappings in the +// GetAvailableUIDMap returns the UID mappings in the // current user namespace. -func GetAvailableUidMap() ([]user.IDMap, error) { +func GetAvailableUIDMap() ([]user.IDMap, error) { uidMapOnce.Do(func() { var err error uidMap, err = user.ParseIDMapFile("/proc/self/uid_map") @@ -75,9 +75,9 @@ func GetAvailableUidMap() ([]user.IDMap, error) { return uidMap, uidMapError } -// GetAvailableGidMap returns the GID mappings in the +// GetAvailableGIDMap returns the GID mappings in the // current user namespace. -func GetAvailableGidMap() ([]user.IDMap, error) { +func GetAvailableGIDMap() ([]user.IDMap, error) { gidMapOnce.Do(func() { var err error gidMap, err = user.ParseIDMapFile("/proc/self/gid_map") @@ -92,11 +92,11 @@ func GetAvailableGidMap() ([]user.IDMap, error) { // GetAvailableIDMaps returns the UID and GID mappings in the // current user namespace. func GetAvailableIDMaps() ([]user.IDMap, []user.IDMap, error) { - u, err := GetAvailableUidMap() + u, err := GetAvailableUIDMap() if err != nil { return nil, nil, err } - g, err := GetAvailableGidMap() + g, err := GetAvailableGIDMap() if err != nil { return nil, nil, err } @@ -114,7 +114,7 @@ func countAvailableIDs(mappings []user.IDMap) int64 { // GetAvailableUids returns how many UIDs are available in the // current user namespace. func GetAvailableUids() (int64, error) { - uids, err := GetAvailableUidMap() + uids, err := GetAvailableUIDMap() if err != nil { return -1, err } @@ -125,7 +125,7 @@ func GetAvailableUids() (int64, error) { // GetAvailableGids returns how many GIDs are available in the // current user namespace. func GetAvailableGids() (int64, error) { - gids, err := GetAvailableGidMap() + gids, err := GetAvailableGIDMap() if err != nil { return -1, err } -- cgit v1.2.3-54-g00ecf