| 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 | "stringsscip-go gomod github.com/golang/go/src go1.22 strings/" |
| 6 | ) |
| 7 | |
| 8 | type StringFlagscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/StringFlag# = FlagBasescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/FlagBase#[string, StringConfigscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/StringConfig#, stringValuescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/stringValue#] |
| 9 | |
| 10 | // StringConfig defines the configuration for string flags |
| 11 | type StringConfigscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/StringConfig# struct { |
| 12 | // Whether to trim whitespace of parsed value |
| 13 | TrimSpacescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/StringConfig#TrimSpace. bool |
| 14 | } |
| 15 | |
| 16 | // -- string Value |
| 17 | type stringValuescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/stringValue# struct { |
| 18 | destinationscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/stringValue#destination. *string |
| 19 | trimSpacescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/stringValue#trimSpace. bool |
| 20 | } |
| 21 | |
| 22 | // Below functions are to satisfy the ValueCreator interface |
| 23 | |
| 24 | func (s stringValuescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/stringValue#) Createscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/stringValue#Create().(val string, p *string, c StringConfigscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/StringConfig#) Valuescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/Value# { |
| 25 | *p = val |
| 26 | return &stringValuescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/stringValue#{ |
| 27 | destinationscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/stringValue#destination.: p, |
| 28 | trimSpacescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/stringValue#trimSpace.: c.TrimSpacescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/StringConfig#TrimSpace., |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | func (s stringValuescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/stringValue#) ToStringscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/stringValue#ToString().(val string) string { |
| 33 | s.destinationscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/stringValue#destination. = &val |
| 34 | return s.Stringscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/stringValue#String().() |
| 35 | } |
| 36 | |
| 37 | // Below functions are to satisfy the flag.Value interface |
| 38 | |
| 39 | func (s *stringValuescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/stringValue#) Setscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/stringValue#Set().(val string) error { |
| 40 | if s.trimSpacescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/stringValue#trimSpace. { |
| 41 | val = stringsscip-go gomod github.com/golang/go/src go1.22 strings/.TrimSpacescip-go gomod github.com/golang/go/src go1.22 strings/TrimSpace().(val) |
| 42 | } |
| 43 | *s.destinationscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/stringValue#destination. = val |
| 44 | return nil |
| 45 | } |
| 46 | |
| 47 | func (s *stringValuescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/stringValue#) Getscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/stringValue#Get().() any { return *s.destinationscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/stringValue#destination. } |
| 48 | |
| 49 | func (s *stringValuescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/stringValue#) Stringscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/stringValue#String().() string { |
| 50 | if s.destinationscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/stringValue#destination. != nil && *s.destinationscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/stringValue#destination. != "" { |
| 51 | return fmtscip-go gomod github.com/golang/go/src go1.22 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.22 fmt/Sprintf().("%q", *s.destinationscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/stringValue#destination.) |
| 52 | } |
| 53 | return "" |
| 54 | } |
| 55 | |
| 56 | func (cmd *Commandscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/Command#) Stringscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/Command#String().(name string) string { |
| 57 | if v, ok := cmd.Valuescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/Command#Value().(name).(string); ok { |
| 58 | tracefscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/tracef().("string available for flag name %[1]q with value=%[2]v (cmd=%[3]q)", name, v, cmd.Namescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/Command#Name.) |
| 59 | return v |
| 60 | } |
| 61 | |
| 62 | tracefscip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/tracef().("string NOT available for flag name %[1]q (cmd=%[2]q)", name, cmd.Namescip-go gomod github.com/urfave/cli/v3 . `github.com/urfave/cli/v3`/Command#Name.) |
| 63 | return "" |
| 64 | } |