Debian Codegraph @

internal/driver/flags.go

raw symbols SCIP
1 // Copyright 2018 Google Inc. All Rights Reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 package driverscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/
16
17 import (
18 "flagscip-go gomod github.com/golang/go/src go1.24.0 flag/"
19 "stringsscip-go gomod github.com/golang/go/src go1.24.0 strings/"
20 )
21
22 // GoFlags implements the plugin.FlagSet interface.
23 type GoFlagsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/GoFlags# struct {
24 UsageMsgsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/GoFlags#UsageMsgs. []string
25 }
26
27 // Bool implements the plugin.FlagSet interface.
28 func (*GoFlagsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/GoFlags#) Boolscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/GoFlags#Bool().(o string, d bool, c string) *bool {
29 return flagscip-go gomod github.com/golang/go/src go1.24.0 flag/.Boolscip-go gomod github.com/golang/go/src go1.24.0 flag/Bool().(o, d, c)
30 }
31
32 // Int implements the plugin.FlagSet interface.
33 func (*GoFlagsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/GoFlags#) Intscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/GoFlags#Int().(o string, d int, c string) *int {
34 return flagscip-go gomod github.com/golang/go/src go1.24.0 flag/.Intscip-go gomod github.com/golang/go/src go1.24.0 flag/Int().(o, d, c)
35 }
36
37 // Float64 implements the plugin.FlagSet interface.
38 func (*GoFlagsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/GoFlags#) Float64scip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/GoFlags#Float64().(o string, d float64, c string) *float64 {
39 return flagscip-go gomod github.com/golang/go/src go1.24.0 flag/.Float64scip-go gomod github.com/golang/go/src go1.24.0 flag/Float64().(o, d, c)
40 }
41
42 // String implements the plugin.FlagSet interface.
43 func (*GoFlagsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/GoFlags#) Stringscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/GoFlags#String().(o, d, c string) *string {
44 return flagscip-go gomod github.com/golang/go/src go1.24.0 flag/.Stringscip-go gomod github.com/golang/go/src go1.24.0 flag/String().(o, d, c)
45 }
46
47 // StringList implements the plugin.FlagSet interface.
48 func (*GoFlagsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/GoFlags#) StringListscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/GoFlags#StringList().(o, d, c string) *[]*string {
49 return &[]*string{flagscip-go gomod github.com/golang/go/src go1.24.0 flag/.Stringscip-go gomod github.com/golang/go/src go1.24.0 flag/String().(o, d, c)}
50 }
51
52 // ExtraUsage implements the plugin.FlagSet interface.
53 func (f *GoFlagsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/GoFlags#) ExtraUsagescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/GoFlags#ExtraUsage().() string {
54 return stringsscip-go gomod github.com/golang/go/src go1.24.0 strings/.Joinscip-go gomod github.com/golang/go/src go1.24.0 strings/Join().(f.UsageMsgsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/GoFlags#UsageMsgs., "\n")
55 }
56
57 // AddExtraUsage implements the plugin.FlagSet interface.
58 func (f *GoFlagsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/GoFlags#) AddExtraUsagescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/GoFlags#AddExtraUsage().(eu string) {
59 f.UsageMsgsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/GoFlags#UsageMsgs. = append(f.UsageMsgsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/GoFlags#UsageMsgs., eu)
60 }
61
62 // Parse implements the plugin.FlagSet interface.
63 func (*GoFlagsscip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/GoFlags#) Parsescip-go gomod github.com/google/pprof . `github.com/google/pprof/internal/driver`/GoFlags#Parse().(usage func()) []string {
64 flagscip-go gomod github.com/golang/go/src go1.24.0 flag/.Usagescip-go gomod github.com/golang/go/src go1.24.0 flag/Usage. = usage
65 flagscip-go gomod github.com/golang/go/src go1.24.0 flag/.Parsescip-go gomod github.com/golang/go/src go1.24.0 flag/Parse().()
66 args := flagscip-go gomod github.com/golang/go/src go1.24.0 flag/.Argsscip-go gomod github.com/golang/go/src go1.24.0 flag/Args().()
67 if len(args) == 0 {
68 usage()
69 }
70 return args
71 }