summaryrefslogtreecommitdiff
path: root/pkg/rootless/rootless.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-02-12 11:30:00 -0500
committerGitHub <noreply@github.com>2021-02-12 11:30:00 -0500
commit291f59600b7857bbec6f340d3ceec6e2e9ce923f (patch)
tree401aaa4e56cbe585582fa1124a9cd77a83ae21a9 /pkg/rootless/rootless.go
parent1b284a298c0bde20561321f325d4a7ad00e7bd25 (diff)
parent78c8a87362ee27ba1d2a62b7c9d73adc313c7d7e (diff)
downloadpodman-291f59600b7857bbec6f340d3ceec6e2e9ce923f.tar.gz
podman-291f59600b7857bbec6f340d3ceec6e2e9ce923f.tar.bz2
podman-291f59600b7857bbec6f340d3ceec6e2e9ce923f.zip
Merge pull request #9331 from Luap99/lint
Enable more golangci-lint linters
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
}