github.com/u-root/u-root@v7.0.1-0.20200915234505-ad7babab0a8e+incompatible/cmds/core/elvish/getopt/string.go (about) 1 // Code generated by "stringer -type=Config,HasArg,ContextType -output=string.go"; DO NOT EDIT. 2 3 package getopt 4 5 import "strconv" 6 7 const ( 8 _Config_name_0 = "DoubleDashTerminatesOptionsFirstArgTerminatesOptions" 9 _Config_name_1 = "LongOnly" 10 ) 11 12 var ( 13 _Config_index_0 = [...]uint8{0, 27, 52} 14 ) 15 16 func (i Config) String() string { 17 switch { 18 case 1 <= i && i <= 2: 19 i -= 1 20 return _Config_name_0[_Config_index_0[i]:_Config_index_0[i+1]] 21 case i == 4: 22 return _Config_name_1 23 default: 24 return "Config(" + strconv.FormatInt(int64(i), 10) + ")" 25 } 26 } 27 28 const _HasArg_name = "NoArgumentRequiredArgumentOptionalArgument" 29 30 var _HasArg_index = [...]uint8{0, 10, 26, 42} 31 32 func (i HasArg) String() string { 33 if i >= HasArg(len(_HasArg_index)-1) { 34 return "HasArg(" + strconv.FormatInt(int64(i), 10) + ")" 35 } 36 return _HasArg_name[_HasArg_index[i]:_HasArg_index[i+1]] 37 } 38 39 const _ContextType_name = "NewOptionOrArgumentNewOptionNewLongOptionLongOptionChainShortOptionOptionArgumentArgument" 40 41 var _ContextType_index = [...]uint8{0, 19, 28, 41, 51, 67, 81, 89} 42 43 func (i ContextType) String() string { 44 if i >= ContextType(len(_ContextType_index)-1) { 45 return "ContextType(" + strconv.FormatInt(int64(i), 10) + ")" 46 } 47 return _ContextType_name[_ContextType_index[i]:_ContextType_index[i+1]] 48 }