- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for hasFlag (0.51 sec)
-
src/cmd/go/internal/base/base.go
return sub } } return nil } // hasFlag reports whether a command or any of its subcommands contain the given // flag. func hasFlag(c *Command, name string) bool { if f := c.Flag.Lookup(name); f != nil { return true } for _, sub := range c.Commands { if hasFlag(sub, name) { return true } } return false }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 18:15:22 UTC 2024 - 5.3K bytes - Viewed (0) -
src/cmd/go/internal/base/goflags.go
} Fatalf("go: parsing $GOFLAGS: non-flag %q", f) } name := f[1:] if name[0] == '-' { name = name[1:] } if i := strings.Index(name, "="); i >= 0 { name = name[:i] } if !hasFlag(Go, name) { if hideErrors { continue } Fatalf("go: parsing $GOFLAGS: unknown flag -%s", name) } } } // boolFlag is the optional interface for flag.Value known to the flag package.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Dec 19 14:42:39 UTC 2023 - 4.5K bytes - Viewed (0) -
cmd/genyaml/gen_kubectl_yaml.go
doc.Synopsis = forceMultiLine(command.Short) doc.Description = forceMultiLine(command.Long) flags := command.NonInheritedFlags() if flags.HasFlags() { doc.Options = genFlagResult(flags) } flags = command.InheritedFlags() if flags.HasFlags() { doc.InheritedOptions = genFlagResult(flags) } if len(command.Example) > 0 { doc.Example = command.Example }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 05 14:05:23 UTC 2023 - 4.2K bytes - Viewed (0) -
cmd/genman/gen_kube_man.go
} }) } func printOptions(out *bytes.Buffer, command *cobra.Command) { flags := command.NonInheritedFlags() if flags.HasFlags() { fmt.Fprintf(out, "# OPTIONS\n") printFlags(out, flags) fmt.Fprintf(out, "\n") } flags = command.InheritedFlags() if flags.HasFlags() { fmt.Fprintf(out, "# OPTIONS INHERITED FROM PARENT COMMANDS\n") printFlags(out, flags) fmt.Fprintf(out, "\n") } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 05 12:03:09 UTC 2023 - 6.3K bytes - Viewed (0) -
src/crypto/tls/prf.go
func (h finishedHash) hashForClientCertificate(sigType uint8, hashAlg crypto.Hash) []byte { if (h.version >= VersionTLS12 || sigType == signatureEd25519) && h.buffer == nil { panic("tls: handshake hash for a client certificate requested after discarding the handshake buffer") } if sigType == signatureEd25519 { return h.buffer } if h.version >= VersionTLS12 { hash := hashAlg.New() hash.Write(h.buffer)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 21 16:29:49 UTC 2023 - 9.2K bytes - Viewed (0) -
src/go/build/constraint/expr_test.go
} tags := make(map[string]bool) wantTags := make(map[string]bool) for _, tag := range strings.Fields(tt.tags) { wantTags[tag] = true } hasTag := func(tag string) bool { tags[tag] = true return tag == "yes" } ok := x.Eval(hasTag) if ok != tt.ok || !reflect.DeepEqual(tags, wantTags) { t.Errorf("Eval(%#q):\nhave ok=%v, tags=%v\nwant ok=%v, tags=%v", tt.in, ok, tags, tt.ok, wantTags)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 18 22:36:55 UTC 2021 - 7.6K bytes - Viewed (0)