oci/caps: rename some vars that conflicted with imports / built-ins

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2020-09-16 12:55:55 +02:00
parent 94334153b5
commit b00b21b93c
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -12,14 +12,14 @@ var capabilityList Capabilities
func init() {
last := capability.CAP_LAST_CAP
for _, cap := range capability.List() {
if cap > last {
for _, c := range capability.List() {
if c > last {
continue
}
capabilityList = append(capabilityList,
&CapabilityMapping{
Key: "CAP_" + strings.ToUpper(cap.String()),
Value: cap,
Key: "CAP_" + strings.ToUpper(c.String()),
Value: c,
},
)
}
@ -46,8 +46,8 @@ func (c *CapabilityMapping) String() string {
// GetAllCapabilities returns all of the capabilities
func GetAllCapabilities() []string {
output := make([]string, len(capabilityList))
for i, capability := range capabilityList {
output[i] = capability.String()
for i, c := range capabilityList {
output[i] = c.String()
}
return output
}