chore: bump deps
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-08-12 07:04:57 +02:00
committed by decentral1se
parent 157d131b37
commit 56a68dfa91
981 changed files with 36486 additions and 39650 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)
}