Bump github.com/containers/common from 0.23.0 to 0.24.0

Bumps [github.com/containers/common](https://github.com/containers/common) from 0.23.0 to 0.24.0.
- [Release notes](https://github.com/containers/common/releases)
- [Commits](https://github.com/containers/common/compare/v0.23.0...v0.24.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2020-10-02 08:59:07 -04:00
parent 14fd7b4d6a
commit f9140f7efc
5 changed files with 73 additions and 6 deletions

2
go.mod
View File

@ -12,7 +12,7 @@ require (
github.com/containernetworking/cni v0.8.0 github.com/containernetworking/cni v0.8.0
github.com/containernetworking/plugins v0.8.7 github.com/containernetworking/plugins v0.8.7
github.com/containers/buildah v1.16.4 github.com/containers/buildah v1.16.4
github.com/containers/common v0.23.0 github.com/containers/common v0.24.0
github.com/containers/conmon v2.0.20+incompatible github.com/containers/conmon v2.0.20+incompatible
github.com/containers/image/v5 v5.6.0 github.com/containers/image/v5 v5.6.0
github.com/containers/psgo v1.5.1 github.com/containers/psgo v1.5.1

4
go.sum
View File

@ -73,8 +73,8 @@ github.com/containernetworking/plugins v0.8.7/go.mod h1:R7lXeZaBzpfqapcAbHRW8/CY
github.com/containers/buildah v1.16.4 h1:bxthp2FoGcpc2O/RyvbGUAZoefmc5hRBqWQi3BjRu7w= github.com/containers/buildah v1.16.4 h1:bxthp2FoGcpc2O/RyvbGUAZoefmc5hRBqWQi3BjRu7w=
github.com/containers/buildah v1.16.4/go.mod h1:i1XqXgpCROnfcq4oNtfrFEk7UzNDxLJ/PZ+CnPyoIq8= github.com/containers/buildah v1.16.4/go.mod h1:i1XqXgpCROnfcq4oNtfrFEk7UzNDxLJ/PZ+CnPyoIq8=
github.com/containers/common v0.21.0/go.mod h1:8w8SVwc+P2p1MOnRMbSKNWXt1Iwd2bKFu2LLZx55DTM= github.com/containers/common v0.21.0/go.mod h1:8w8SVwc+P2p1MOnRMbSKNWXt1Iwd2bKFu2LLZx55DTM=
github.com/containers/common v0.23.0 h1:+g4mI3wUYSzOtoWU9TNVoV4K52/aN6JEz0qs1YdPEe8= github.com/containers/common v0.24.0 h1:5C03ROzmRvZCyooNJVkZ4Q8T2d04g+VVyPMQ428XC4Y=
github.com/containers/common v0.23.0/go.mod h1:E56/N0beWGf+lrrJX32atuo2hkjzHwSC8n1vCG+TAR0= github.com/containers/common v0.24.0/go.mod h1:BFRo6uRh1TbkZgR2oYTILxc2BNZTBtBffa9xtu881QI=
github.com/containers/conmon v2.0.20+incompatible h1:YbCVSFSCqFjjVwHTPINGdMX1F6JXHGTUje2ZYobNrkg= github.com/containers/conmon v2.0.20+incompatible h1:YbCVSFSCqFjjVwHTPINGdMX1F6JXHGTUje2ZYobNrkg=
github.com/containers/conmon v2.0.20+incompatible/go.mod h1:hgwZ2mtuDrppv78a/cOBNiCm6O0UMWGx1mu7P00nu5I= github.com/containers/conmon v2.0.20+incompatible/go.mod h1:hgwZ2mtuDrppv78a/cOBNiCm6O0UMWGx1mu7P00nu5I=
github.com/containers/image/v5 v5.5.2/go.mod h1:4PyNYR0nwlGq/ybVJD9hWlhmIsNra4Q8uOQX2s6E2uM= github.com/containers/image/v5 v5.5.2/go.mod h1:4PyNYR0nwlGq/ybVJD9hWlhmIsNra4Q8uOQX2s6E2uM=

View File

@ -1,6 +1,14 @@
package completion package completion
import "github.com/spf13/cobra" import (
"bufio"
"os"
"strings"
"unicode"
"github.com/containers/common/pkg/capabilities"
"github.com/spf13/cobra"
)
// FlagCompletions - hold flag completion functions to be applied later with CompleteCommandFlags() // FlagCompletions - hold flag completion functions to be applied later with CompleteCommandFlags()
type FlagCompletions map[string]func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) type FlagCompletions map[string]func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
@ -24,3 +32,62 @@ func AutocompleteNone(cmd *cobra.Command, args []string, toComplete string) ([]s
func AutocompleteDefault(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { func AutocompleteDefault(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
return nil, cobra.ShellCompDirectiveDefault return nil, cobra.ShellCompDirectiveDefault
} }
// AutocompleteCapabilities - Autocomplete linux capabilities options.
// Used by --cap-add and --cap-drop.
func AutocompleteCapabilities(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
caps := capabilities.AllCapabilities()
// convertCase will convert a string to lowercase only if the user input is lowercase
convertCase := func(s string) string { return s }
if len(toComplete) > 0 && unicode.IsLower(rune(toComplete[0])) {
convertCase = strings.ToLower
}
// offset is used to trim "CAP_" if the user doesn't type CA... or ca...
offset := 0
if !strings.HasPrefix(toComplete, convertCase("CA")) {
// setting the offset to 4 is safe since each cap starts with CAP_
offset = 4
}
var completions []string
for _, cap := range caps {
completions = append(completions, convertCase(cap)[offset:])
}
// add ALL here which is also a valid argument
completions = append(completions, convertCase(capabilities.All))
return completions, cobra.ShellCompDirectiveNoFileComp
}
// autocompleteSubIDName - autocomplete the names in /etc/subuid or /etc/subgid
func autocompleteSubIDName(filename string) ([]string, cobra.ShellCompDirective) {
file, err := os.Open(filename)
if err != nil {
return nil, cobra.ShellCompDirectiveError
}
defer file.Close()
var names []string
scanner := bufio.NewScanner(file)
for scanner.Scan() {
name := strings.SplitN(scanner.Text(), ":", 2)[0]
names = append(names, name)
}
if err = scanner.Err(); err != nil {
return nil, cobra.ShellCompDirectiveError
}
return names, cobra.ShellCompDirectiveNoFileComp
}
// AutocompleteSubgidName - Autocomplete subgidname based on the names in the /etc/subgid file.
func AutocompleteSubgidName(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
return autocompleteSubIDName("/etc/subgid")
}
// AutocompleteSubuidName - Autocomplete subuidname based on the names in the /etc/subuid file.
func AutocompleteSubuidName(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
return autocompleteSubIDName("/etc/subuid")
}

View File

@ -1,4 +1,4 @@
package version package version
// Version is the version of the build. // Version is the version of the build.
const Version = "0.23.0" const Version = "0.24.0"

2
vendor/modules.txt vendored
View File

@ -87,7 +87,7 @@ github.com/containers/buildah/pkg/secrets
github.com/containers/buildah/pkg/supplemented github.com/containers/buildah/pkg/supplemented
github.com/containers/buildah/pkg/umask github.com/containers/buildah/pkg/umask
github.com/containers/buildah/util github.com/containers/buildah/util
# github.com/containers/common v0.23.0 # github.com/containers/common v0.24.0
github.com/containers/common/pkg/apparmor github.com/containers/common/pkg/apparmor
github.com/containers/common/pkg/apparmor/internal/supported github.com/containers/common/pkg/apparmor/internal/supported
github.com/containers/common/pkg/auth github.com/containers/common/pkg/auth