mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-14 08:07:28 -06:00
[chore]: Bump github.com/spf13/cobra from 1.8.0 to 1.8.1 (#3016)
This commit is contained in:
parent
cc64de4dcc
commit
7ab404d643
12 changed files with 128 additions and 96 deletions
4
vendor/github.com/spf13/cobra/args.go
generated
vendored
4
vendor/github.com/spf13/cobra/args.go
generated
vendored
|
|
@ -52,9 +52,9 @@ func OnlyValidArgs(cmd *Command, args []string) error {
|
|||
if len(cmd.ValidArgs) > 0 {
|
||||
// Remove any description that may be included in ValidArgs.
|
||||
// A description is following a tab character.
|
||||
var validArgs []string
|
||||
validArgs := make([]string, 0, len(cmd.ValidArgs))
|
||||
for _, v := range cmd.ValidArgs {
|
||||
validArgs = append(validArgs, strings.Split(v, "\t")[0])
|
||||
validArgs = append(validArgs, strings.SplitN(v, "\t", 2)[0])
|
||||
}
|
||||
for _, v := range args {
|
||||
if !stringInSlice(v, validArgs) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue