| 1 | package cliscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ |
| 2 | |
| 3 | import ( |
| 4 | "fmtscip-go gomod github.com/golang/go/src go1.22 fmt/" |
| 5 | "osscip-go gomod github.com/golang/go/src go1.22 os/" |
| 6 | "stringsscip-go gomod github.com/golang/go/src go1.22 strings/" |
| 7 | ) |
| 8 | |
| 9 | // ValueSource is a source which can be used to look up a value, |
| 10 | // typically for use with a cli.Flag |
| 11 | type ValueSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSource# interface { |
| 12 | fmtscip-go gomod github.com/golang/go/src go1.22 fmt/.Stringerscip-go gomod github.com/golang/go/src go1.22 fmt/Stringer# |
| 13 | fmtscip-go gomod github.com/golang/go/src go1.22 fmt/.GoStringerscip-go gomod github.com/golang/go/src go1.22 fmt/GoStringer# |
| 14 | |
| 15 | // Lookup returns the value from the source and if it was found |
| 16 | // or returns an empty string and false |
| 17 | Lookupscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSource#Lookup.() (string, bool) |
| 18 | } |
| 19 | |
| 20 | // EnvValueSource is to specifically detect env sources when |
| 21 | // printing help text |
| 22 | type EnvValueSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/EnvValueSource# interface { |
| 23 | IsFromEnvscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/EnvValueSource#IsFromEnv.() bool |
| 24 | Keyscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/EnvValueSource#Key.() string |
| 25 | } |
| 26 | |
| 27 | // MapSource is a source which can be used to look up a value |
| 28 | // based on a key |
| 29 | // typically for use with a cli.Flag |
| 30 | type MapSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/MapSource# interface { |
| 31 | fmtscip-go gomod github.com/golang/go/src go1.22 fmt/.Stringerscip-go gomod github.com/golang/go/src go1.22 fmt/Stringer# |
| 32 | fmtscip-go gomod github.com/golang/go/src go1.22 fmt/.GoStringerscip-go gomod github.com/golang/go/src go1.22 fmt/GoStringer# |
| 33 | |
| 34 | // Lookup returns the value from the source based on key |
| 35 | // and if it was found |
| 36 | // or returns an empty string and false |
| 37 | Lookupscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/MapSource#Lookup.(string) (any, bool) |
| 38 | } |
| 39 | |
| 40 | // ValueSourceChain contains an ordered series of ValueSource that |
| 41 | // allows for lookup where the first ValueSource to resolve is |
| 42 | // returned |
| 43 | type ValueSourceChainscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSourceChain# struct { |
| 44 | Chainscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSourceChain#Chain. []ValueSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSource# |
| 45 | } |
| 46 | |
| 47 | func NewValueSourceChainscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/NewValueSourceChain().(src ...ValueSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSource#) ValueSourceChainscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSourceChain# { |
| 48 | return ValueSourceChainscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSourceChain#{ |
| 49 | Chainscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSourceChain#Chain.: src, |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | func (vsc *ValueSourceChainscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSourceChain#) Appendscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSourceChain#Append().(other ValueSourceChainscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSourceChain#) { |
| 54 | vsc.Chainscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSourceChain#Chain. = append(vsc.Chainscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSourceChain#Chain., other.Chainscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSourceChain#Chain....) |
| 55 | } |
| 56 | |
| 57 | func (vsc *ValueSourceChainscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSourceChain#) EnvKeysscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSourceChain#EnvKeys().() []string { |
| 58 | vals := []string{} |
| 59 | |
| 60 | for _, src := range vsc.Chainscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSourceChain#Chain. { |
| 61 | if v, ok := src.(EnvValueSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/EnvValueSource#); ok && v.IsFromEnvscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/EnvValueSource#IsFromEnv.() { |
| 62 | vals = append(vals, v.Keyscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/EnvValueSource#Key.()) |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | return vals |
| 67 | } |
| 68 | |
| 69 | func (vsc *ValueSourceChainscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSourceChain#) Stringscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSourceChain#String().() string { |
| 70 | s := []string{} |
| 71 | |
| 72 | for _, vs := range vsc.Chainscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSourceChain#Chain. { |
| 73 | s = append(s, vs.Stringscip-go gomod github.com/golang/go/src go1.22 fmt/Stringer#String().()) |
| 74 | } |
| 75 | |
| 76 | return stringsscip-go gomod github.com/golang/go/src go1.22 strings/.Joinscip-go gomod github.com/golang/go/src go1.22 strings/Join().(s, ",") |
| 77 | } |
| 78 | |
| 79 | func (vsc *ValueSourceChainscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSourceChain#) GoStringscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSourceChain#GoString().() string { |
| 80 | s := []string{} |
| 81 | |
| 82 | for _, vs := range vsc.Chainscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSourceChain#Chain. { |
| 83 | s = append(s, vs.GoStringscip-go gomod github.com/golang/go/src go1.22 fmt/GoStringer#GoString().()) |
| 84 | } |
| 85 | |
| 86 | return fmtscip-go gomod github.com/golang/go/src go1.22 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.22 fmt/Sprintf().("&ValueSourceChain{Chain:{%[1]s}}", stringsscip-go gomod github.com/golang/go/src go1.22 strings/.Joinscip-go gomod github.com/golang/go/src go1.22 strings/Join().(s, ",")) |
| 87 | } |
| 88 | |
| 89 | func (vsc *ValueSourceChainscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSourceChain#) Lookupscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSourceChain#Lookup().() (string, bool) { |
| 90 | s, _, ok := vsc.LookupWithSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSourceChain#LookupWithSource().() |
| 91 | return s, ok |
| 92 | } |
| 93 | |
| 94 | func (vsc *ValueSourceChainscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSourceChain#) LookupWithSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSourceChain#LookupWithSource().() (string, ValueSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSource#, bool) { |
| 95 | for _, src := range vsc.Chainscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSourceChain#Chain. { |
| 96 | if value, found := src.Lookupscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSource#Lookup.(); found { |
| 97 | return value, src, true |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | return "", nil, false |
| 102 | } |
| 103 | |
| 104 | // envVarValueSource encapsulates a ValueSource from an environment variable |
| 105 | type envVarValueSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/envVarValueSource# struct { |
| 106 | keyscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/envVarValueSource#key. string |
| 107 | } |
| 108 | |
| 109 | func (e *envVarValueSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/envVarValueSource#) Lookupscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/envVarValueSource#Lookup().() (string, bool) { |
| 110 | return osscip-go gomod github.com/golang/go/src go1.22 os/.LookupEnvscip-go gomod github.com/golang/go/src go1.22 os/LookupEnv().(stringsscip-go gomod github.com/golang/go/src go1.22 strings/.TrimSpacescip-go gomod github.com/golang/go/src go1.22 strings/TrimSpace().(string(e.keyscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/envVarValueSource#key.))) |
| 111 | } |
| 112 | |
| 113 | func (e *envVarValueSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/envVarValueSource#) IsFromEnvscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/envVarValueSource#IsFromEnv().() bool { |
| 114 | return true |
| 115 | } |
| 116 | |
| 117 | func (e *envVarValueSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/envVarValueSource#) Keyscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/envVarValueSource#Key().() string { |
| 118 | return e.keyscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/envVarValueSource#key. |
| 119 | } |
| 120 | |
| 121 | func (e *envVarValueSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/envVarValueSource#) Stringscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/envVarValueSource#String().() string { return fmtscip-go gomod github.com/golang/go/src go1.22 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.22 fmt/Sprintf().("environment variable %[1]q", e.keyscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/envVarValueSource#key.) } |
| 122 | func (e *envVarValueSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/envVarValueSource#) GoStringscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/envVarValueSource#GoString().() string { |
| 123 | return fmtscip-go gomod github.com/golang/go/src go1.22 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.22 fmt/Sprintf().("&envVarValueSource{Key:%[1]q}", e.keyscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/envVarValueSource#key.) |
| 124 | } |
| 125 | |
| 126 | func EnvVarscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/EnvVar().(key string) ValueSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSource# { |
| 127 | return &envVarValueSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/envVarValueSource#{ |
| 128 | keyscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/envVarValueSource#key.: key, |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | // EnvVars is a helper function to encapsulate a number of |
| 133 | // envVarValueSource together as a ValueSourceChain |
| 134 | func EnvVarsscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/EnvVars().(keys ...string) ValueSourceChainscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSourceChain# { |
| 135 | vsc := ValueSourceChainscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSourceChain#{Chainscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSourceChain#Chain.: []ValueSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSource#{}} |
| 136 | |
| 137 | for _, key := range keys { |
| 138 | vsc.Chainscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSourceChain#Chain. = append(vsc.Chainscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSourceChain#Chain., EnvVarscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/EnvVar().(key)) |
| 139 | } |
| 140 | |
| 141 | return vsc |
| 142 | } |
| 143 | |
| 144 | // fileValueSource encapsulates a ValueSource from a file |
| 145 | type fileValueSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/fileValueSource# struct { |
| 146 | Pathscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/fileValueSource#Path. string |
| 147 | } |
| 148 | |
| 149 | func (f *fileValueSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/fileValueSource#) Lookupscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/fileValueSource#Lookup().() (string, bool) { |
| 150 | data, err := osscip-go gomod github.com/golang/go/src go1.22 os/.ReadFilescip-go gomod github.com/golang/go/src go1.22 os/ReadFile().(f.Pathscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/fileValueSource#Path.) |
| 151 | return string(data), err == nil |
| 152 | } |
| 153 | |
| 154 | func (f *fileValueSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/fileValueSource#) Stringscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/fileValueSource#String().() string { return fmtscip-go gomod github.com/golang/go/src go1.22 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.22 fmt/Sprintf().("file %[1]q", f.Pathscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/fileValueSource#Path.) } |
| 155 | func (f *fileValueSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/fileValueSource#) GoStringscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/fileValueSource#GoString().() string { |
| 156 | return fmtscip-go gomod github.com/golang/go/src go1.22 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.22 fmt/Sprintf().("&fileValueSource{Path:%[1]q}", f.Pathscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/fileValueSource#Path.) |
| 157 | } |
| 158 | |
| 159 | func Filescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/File().(path string) ValueSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSource# { |
| 160 | return &fileValueSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/fileValueSource#{Pathscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/fileValueSource#Path.: path} |
| 161 | } |
| 162 | |
| 163 | // Files is a helper function to encapsulate a number of |
| 164 | // fileValueSource together as a ValueSourceChain |
| 165 | func Filesscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/Files().(paths ...string) ValueSourceChainscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSourceChain# { |
| 166 | vsc := ValueSourceChainscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSourceChain#{Chainscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSourceChain#Chain.: []ValueSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSource#{}} |
| 167 | |
| 168 | for _, path := range paths { |
| 169 | vsc.Chainscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSourceChain#Chain. = append(vsc.Chainscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSourceChain#Chain., Filescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/File().(path)) |
| 170 | } |
| 171 | |
| 172 | return vsc |
| 173 | } |
| 174 | |
| 175 | type mapSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/mapSource# struct { |
| 176 | namescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/mapSource#name. string |
| 177 | mscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/mapSource#m. map[any]any |
| 178 | } |
| 179 | |
| 180 | func NewMapSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/NewMapSource().(name string, m map[any]any) MapSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/MapSource# { |
| 181 | return &mapSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/mapSource#{ |
| 182 | namescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/mapSource#name.: name, |
| 183 | mscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/mapSource#m.: m, |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | func (ms *mapSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/mapSource#) Stringscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/mapSource#String().() string { return fmtscip-go gomod github.com/golang/go/src go1.22 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.22 fmt/Sprintf().("map source %[1]q", ms.namescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/mapSource#name.) } |
| 188 | func (ms *mapSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/mapSource#) GoStringscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/mapSource#GoString().() string { |
| 189 | return fmtscip-go gomod github.com/golang/go/src go1.22 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.22 fmt/Sprintf().("&mapSource{name:%[1]q}", ms.namescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/mapSource#name.) |
| 190 | } |
| 191 | |
| 192 | // Lookup returns a value from the map source. The lookup name may be a dot-separated path into the map. |
| 193 | // If that is the case, it will recursively traverse the map based on the '.' delimited sections to find |
| 194 | // a nested value for the key. |
| 195 | func (ms *mapSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/mapSource#) Lookupscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/mapSource#Lookup().(name string) (any, bool) { |
| 196 | sections := stringsscip-go gomod github.com/golang/go/src go1.22 strings/.Splitscip-go gomod github.com/golang/go/src go1.22 strings/Split().(name, ".") |
| 197 | if name == "" || len(sections) == 0 { |
| 198 | return nil, false |
| 199 | } |
| 200 | |
| 201 | node := ms.mscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/mapSource#m. |
| 202 | |
| 203 | // traverse into the map based on the dot-separated sections |
| 204 | if len(sections) >= 2 { // the last section is the value we want, we will return it directly at the end |
| 205 | for _, section := range sections[:len(sections)-1] { |
| 206 | child, ok := node[section] |
| 207 | if !ok { |
| 208 | return nil, false |
| 209 | } |
| 210 | |
| 211 | switch child := child.(type) { |
| 212 | case map[string]any: |
| 213 | node = make(map[any]any, len(child)) |
| 214 | for k, v := range child { |
| 215 | node[k] = v |
| 216 | } |
| 217 | case map[any]any: |
| 218 | node = child |
| 219 | default: |
| 220 | return nil, false |
| 221 | } |
| 222 | } |
| 223 | } |
| 224 | |
| 225 | if val, ok := node[sections[len(sections)-1]]; ok { |
| 226 | return val, true |
| 227 | } |
| 228 | return nil, false |
| 229 | } |
| 230 | |
| 231 | type mapValueSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/mapValueSource# struct { |
| 232 | keyscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/mapValueSource#key. string |
| 233 | msscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/mapValueSource#ms. MapSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/MapSource# |
| 234 | } |
| 235 | |
| 236 | func NewMapValueSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/NewMapValueSource().(key string, ms MapSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/MapSource#) ValueSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/ValueSource# { |
| 237 | return &mapValueSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/mapValueSource#{ |
| 238 | keyscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/mapValueSource#key.: key, |
| 239 | msscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/mapValueSource#ms.: ms, |
| 240 | } |
| 241 | } |
| 242 | |
| 243 | func (mvs *mapValueSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/mapValueSource#) Stringscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/mapValueSource#String().() string { |
| 244 | return fmtscip-go gomod github.com/golang/go/src go1.22 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.22 fmt/Sprintf().("key %[1]q from %[2]s", mvs.keyscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/mapValueSource#key., mvs.msscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/mapValueSource#ms..Stringscip-go gomod github.com/golang/go/src go1.22 fmt/Stringer#String().()) |
| 245 | } |
| 246 | |
| 247 | func (mvs *mapValueSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/mapValueSource#) GoStringscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/mapValueSource#GoString().() string { |
| 248 | return fmtscip-go gomod github.com/golang/go/src go1.22 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.22 fmt/Sprintf().("&mapValueSource{key:%[1]q, src:%[2]s}", mvs.keyscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/mapValueSource#key., mvs.msscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/mapValueSource#ms..GoStringscip-go gomod github.com/golang/go/src go1.22 fmt/GoStringer#GoString().()) |
| 249 | } |
| 250 | |
| 251 | func (mvs *mapValueSourcescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/mapValueSource#) Lookupscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/mapValueSource#Lookup().() (string, bool) { |
| 252 | if v, ok := mvs.msscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/mapValueSource#ms..Lookupscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/MapSource#Lookup.(mvs.keyscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/mapValueSource#key.); !ok { |
| 253 | return "", false |
| 254 | } else { |
| 255 | return fmtscip-go gomod github.com/golang/go/src go1.22 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.22 fmt/Sprintf().("%+v", v), true |
| 256 | } |
| 257 | } |