summaryrefslogtreecommitdiff
path: root/pkg/rootless/rootless.go
diff options
context:
space:
mode:
authorPaul Holzinger <paul.holzinger@web.de>2021-02-11 14:15:26 +0100
committerPaul Holzinger <paul.holzinger@web.de>2021-02-11 23:01:29 +0100
commitef2fc90f2d0057bfddee1b83d307e853181a4988 (patch)
treed1a8f350ff32068ea017e7a5c5384c8a184a8fb5 /pkg/rootless/rootless.go
parentafe4ce6b1ce6a5ba21472f51defd243bdd7750b3 (diff)
downloadpodman-ef2fc90f2d0057bfddee1b83d307e853181a4988.tar.gz
podman-ef2fc90f2d0057bfddee1b83d307e853181a4988.tar.bz2
podman-ef2fc90f2d0057bfddee1b83d307e853181a4988.zip
Enable stylecheck linter
Use the stylecheck linter and fix the reported problems. [NO TESTS NEEDED] Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
Diffstat (limited to 'pkg/rootless/rootless.go')
-rw-r--r--pkg/rootless/rootless.go16
1 files changed, 8 insertions, 8 deletions
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
}