- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 23 for CountFlags (0.34 sec)
-
src/cmd/vendor/golang.org/x/telemetry/counter/counter.go
// Programs using telemetry should call Open exactly once. func Open() { counter.Open() } // CountFlags creates a counter for every flag that is set // and increments the counter. The name of the counter is // the concatenation of prefix and the flag name. // // For instance, CountFlags("gopls/flag:", *flag.CommandLine) func CountFlags(prefix string, fs flag.FlagSet) { fs.Visit(func(f *flag.Flag) { New(prefix + f.Name).Inc() }) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 15 18:02:34 UTC 2024 - 4.2K bytes - Viewed (0) -
src/cmd/internal/telemetry/telemetry.go
return counter.NewStack(name, depth) } // CountFlags creates a counter for every flag that is set // and increments the counter. The name of the counter is // the concatenation of prefix and the flag name. func CountFlags(prefix string, flagSet flag.FlagSet) { counter.CountFlags(prefix, flagSet) } // CountFlagValue creates a counter for the flag value
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 15:47:30 UTC 2024 - 3.6K bytes - Viewed (0) -
src/cmd/buildid/buildid.go
func main() { log.SetPrefix("buildid: ") log.SetFlags(0) telemetry.Start() flag.Usage = usage flag.Parse() telemetry.Inc("buildid/invocations") telemetry.CountFlags("buildid/flag:", *flag.CommandLine) if flag.NArg() != 1 { usage() } file := flag.Arg(0) id, err := buildid.ReadFile(file) if err != nil { log.Fatal(err) } if !*wflag {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 19:41:17 UTC 2024 - 1.7K bytes - Viewed (0) -
src/cmd/internal/telemetry/telemetry_bootstrap.go
func NewCounter(name string) dummyCounter { return dummyCounter{} } func NewStackCounter(name string, depth int) dummyCounter { return dummyCounter{} } func CountFlags(name string, flagSet flag.FlagSet) {} func CountFlagValue(prefix string, flagSet flag.FlagSet, flagName string) {} func Mode() string { return "" }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 20:16:39 UTC 2024 - 1.1K bytes - Viewed (0) -
src/cmd/preprofile/main.go
} func main() { objabi.AddVersionFlag() log.SetFlags(0) log.SetPrefix("preprofile: ") telemetry.Start() flag.Usage = usage flag.Parse() telemetry.Inc("preprofile/invocations") telemetry.CountFlags("preprofile/flag:", *flag.CommandLine) if *input == "" { log.Print("Input pprof path required (-i)") usage() } if err := preprocess(*input, *output); err != nil { log.Fatal(err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 19:41:17 UTC 2024 - 1.9K bytes - Viewed (0) -
src/cmd/asm/main.go
) func main() { log.SetFlags(0) log.SetPrefix("asm: ") telemetry.Start() buildcfg.Check() GOARCH := buildcfg.GOARCH flags.Parse() telemetry.Inc("asm/invocations") telemetry.CountFlags("asm/flag:", *flag.CommandLine) architecture := arch.Set(GOARCH, *flags.Shared || *flags.Dynlink) if architecture == nil { log.Fatalf("unrecognized architecture %s", GOARCH) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 19:41:17 UTC 2024 - 2.9K bytes - Viewed (0) -
src/cmd/objdump/main.go
os.Exit(2) } func main() { log.SetFlags(0) log.SetPrefix("objdump: ") telemetry.Start() flag.Usage = usage flag.Parse() telemetry.Inc("objdump/invocations") telemetry.CountFlags("objdump/flag:", *flag.CommandLine) if flag.NArg() != 1 && flag.NArg() != 3 { usage() } if *symregexp != "" { re, err := regexp.Compile(*symregexp) if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 19:41:17 UTC 2024 - 2.7K bytes - Viewed (0) -
src/cmd/vet/main.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 19:41:17 UTC 2024 - 2.9K bytes - Viewed (0) -
src/cmd/nm/nm.go
if *sortOrder == "address" { return "true" } return "false" } func main() { log.SetFlags(0) telemetry.Start() flag.Usage = usage flag.Parse() telemetry.Inc("nm/invocations") telemetry.CountFlags("nm/flag:", *flag.CommandLine) switch *sortOrder { case "address", "name", "none", "size": // ok default: fmt.Fprintf(os.Stderr, "nm: unknown sort order %q\n", *sortOrder) os.Exit(2) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 19:41:17 UTC 2024 - 3.1K bytes - Viewed (0) -
src/cmd/covdata/covdata.go
// Edit out command selector, then parse flags. os.Args = append(os.Args[:1], os.Args[2:]...) flag.Usage = func() { op.Usage("") } flag.Parse() telemetry.Inc("covdata/invocations") telemetry.CountFlags("covdata/flag:", *flag.CommandLine) // Mode-independent flag setup dbgtrace(1, "starting mode-independent setup") if flag.NArg() != 0 { op.Usage("unknown extra arguments") } if *pkgpatflag != "" {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 19:41:17 UTC 2024 - 5.7K bytes - Viewed (0)