mirror of
https://github.com/kubenetworks/kubevpn.git
synced 2025-10-14 03:23:47 +08:00
refactor: update go mod library (#210)
refactor: update go mod library and refactor dev logic Co-authored-by: wencaiwulue <895703375@qq.com>
This commit is contained in:
14
vendor/github.com/docker/cli/opts/capabilities.go
generated
vendored
14
vendor/github.com/docker/cli/opts/capabilities.go
generated
vendored
@@ -21,15 +21,15 @@ const (
|
||||
// This function only handles rudimentary formatting; no validation is performed,
|
||||
// as the list of available capabilities can be updated over time, thus should be
|
||||
// handled by the daemon.
|
||||
func NormalizeCapability(cap string) string {
|
||||
cap = strings.ToUpper(strings.TrimSpace(cap))
|
||||
if cap == AllCapabilities || cap == ResetCapabilities {
|
||||
return cap
|
||||
func NormalizeCapability(capability string) string {
|
||||
capability = strings.ToUpper(strings.TrimSpace(capability))
|
||||
if capability == AllCapabilities || capability == ResetCapabilities {
|
||||
return capability
|
||||
}
|
||||
if !strings.HasPrefix(cap, "CAP_") {
|
||||
cap = "CAP_" + cap
|
||||
if !strings.HasPrefix(capability, "CAP_") {
|
||||
capability = "CAP_" + capability
|
||||
}
|
||||
return cap
|
||||
return capability
|
||||
}
|
||||
|
||||
// CapabilitiesMap normalizes the given capabilities and converts them to a map.
|
||||
|
Reference in New Issue
Block a user