Add adds a new option with the specified key and returns the OptionArgs for setting its arguments. If the option already exists, it returns the existing OptionArgs.
(key string)
| 41 | // and returns the OptionArgs for setting its arguments. |
| 42 | // If the option already exists, it returns the existing OptionArgs. |
| 43 | func (o OptionsBuilder) Add(key string) *OptionArgs { |
| 44 | if _, exists := o[key]; !exists { |
| 45 | o[key] = &OptionArgs{} |
| 46 | } |
| 47 | |
| 48 | return o[key] |
| 49 | } |
| 50 | |
| 51 | // String returns the string representation of the options, joining them with '/'. |
| 52 | func (o OptionsBuilder) String() string { |
no outgoing calls