Update vendor dependencies

- Update github.com/containers/common to v0.64.1-0.20250806164630-57def9601f3b
- Update github.com/spf13/pflag to v1.0.7
- Update github.com/seccomp/libseccomp-golang to v0.11.1

Signed-off-by: Joshua Arrevillaga <2004jarrevillaga@gmail.com>
This commit is contained in:
Joshua Arrevillaga
2025-08-07 14:54:08 -04:00
parent a97d90c89b
commit e14b8acba8
24 changed files with 594 additions and 77 deletions

View File

@@ -10,6 +10,15 @@ import (
"strings"
)
// go test flags prefixes
func isGotestFlag(flag string) bool {
return strings.HasPrefix(flag, "-test.")
}
func isGotestShorthandFlag(flag string) bool {
return strings.HasPrefix(flag, "test.")
}
// flagValueWrapper implements pflag.Value around a flag.Value. The main
// difference here is the addition of the Type method that returns a string
// name of the type. As this is generally unknown, we approximate that with
@@ -103,3 +112,16 @@ func (f *FlagSet) AddGoFlagSet(newSet *goflag.FlagSet) {
}
f.addedGoFlagSets = append(f.addedGoFlagSets, newSet)
}
// ParseSkippedFlags explicitly Parses go test flags (i.e. the one starting with '-test.') with goflag.Parse(),
// since by default those are skipped by pflag.Parse().
// Typical usage example: `ParseGoTestFlags(os.Args[1:], goflag.CommandLine)`
func ParseSkippedFlags(osArgs []string, goFlagSet *goflag.FlagSet) error {
var skippedFlags []string
for _, f := range osArgs {
if isGotestFlag(f) {
skippedFlags = append(skippedFlags, f)
}
}
return goFlagSet.Parse(skippedFlags)
}