| 1 | // Copyright 2013 Google Inc. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
| 5 | package getoptscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/ |
| 6 | |
| 7 | type stringValuescip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/stringValue# string |
| 8 | |
| 9 | func (s *stringValuescip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/stringValue#) Setscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/stringValue#Set().(value string, opt Optionscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Option#) error { |
| 10 | *s = stringValuescip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/stringValue#(value) |
| 11 | return nil |
| 12 | } |
| 13 | |
| 14 | func (s *stringValuescip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/stringValue#) Stringscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/stringValue#String().() string { |
| 15 | return string(*s) |
| 16 | } |
| 17 | |
| 18 | // String returns a value option that stores is value as a string. The |
| 19 | // initial value of the string is passed in value. |
| 20 | func Stringscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/String().(name rune, value string, helpvalue ...string) *string { |
| 21 | return CommandLinescip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/CommandLine..Stringscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Set#String().(name, value, helpvalue...) |
| 22 | } |
| 23 | |
| 24 | func (s *Setscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Set#) Stringscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Set#String().(name rune, value string, helpvalue ...string) *string { |
| 25 | p := value |
| 26 | s.StringVarLongscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Set#StringVarLong().(&p, "", name, helpvalue...) |
| 27 | return &p |
| 28 | } |
| 29 | |
| 30 | func StringLongscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/StringLong().(name string, short rune, value string, helpvalue ...string) *string { |
| 31 | return CommandLinescip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/CommandLine..StringLongscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Set#StringLong().(name, short, value, helpvalue...) |
| 32 | } |
| 33 | |
| 34 | func (s *Setscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Set#) StringLongscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Set#StringLong().(name string, short rune, value string, helpvalue ...string) *string { |
| 35 | s.StringVarLongscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Set#StringVarLong().(&value, name, short, helpvalue...) |
| 36 | return &value |
| 37 | } |
| 38 | |
| 39 | func StringVarscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/StringVar().(p *string, name rune, helpvalue ...string) Optionscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Option# { |
| 40 | return CommandLinescip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/CommandLine..StringVarscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Set#StringVar().(p, name, helpvalue...) |
| 41 | } |
| 42 | |
| 43 | func (s *Setscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Set#) StringVarscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Set#StringVar().(p *string, name rune, helpvalue ...string) Optionscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Option# { |
| 44 | return s.VarLongscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Set#VarLong().((*stringValuescip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/stringValue#)(p), "", name, helpvalue...) |
| 45 | } |
| 46 | |
| 47 | func StringVarLongscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/StringVarLong().(p *string, name string, short rune, helpvalue ...string) Optionscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Option# { |
| 48 | return CommandLinescip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/CommandLine..StringVarLongscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Set#StringVarLong().(p, name, short, helpvalue...) |
| 49 | } |
| 50 | |
| 51 | func (s *Setscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Set#) StringVarLongscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Set#StringVarLong().(p *string, name string, short rune, helpvalue ...string) Optionscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Option# { |
| 52 | return s.VarLongscip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/Set#VarLong().((*stringValuescip-go gomod github.com/pborman/getopt . `github.com/pborman/getopt`/stringValue#)(p), name, short, helpvalue...) |
| 53 | } |