File: string.go

package info (click to toggle)
elvish 0.12%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,532 kB
  • sloc: python: 108; makefile: 94; sh: 72; xml: 9
file content (48 lines) | stat: -rw-r--r-- 1,278 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Code generated by "stringer -type=Config,HasArg,ContextType -output=string.go"; DO NOT EDIT.

package getopt

import "strconv"

const (
	_Config_name_0 = "DoubleDashTerminatesOptionsFirstArgTerminatesOptions"
	_Config_name_1 = "LongOnly"
)

var (
	_Config_index_0 = [...]uint8{0, 27, 52}
)

func (i Config) String() string {
	switch {
	case 1 <= i && i <= 2:
		i -= 1
		return _Config_name_0[_Config_index_0[i]:_Config_index_0[i+1]]
	case i == 4:
		return _Config_name_1
	default:
		return "Config(" + strconv.FormatInt(int64(i), 10) + ")"
	}
}

const _HasArg_name = "NoArgumentRequiredArgumentOptionalArgument"

var _HasArg_index = [...]uint8{0, 10, 26, 42}

func (i HasArg) String() string {
	if i >= HasArg(len(_HasArg_index)-1) {
		return "HasArg(" + strconv.FormatInt(int64(i), 10) + ")"
	}
	return _HasArg_name[_HasArg_index[i]:_HasArg_index[i+1]]
}

const _ContextType_name = "NewOptionOrArgumentNewOptionNewLongOptionLongOptionChainShortOptionOptionArgumentArgument"

var _ContextType_index = [...]uint8{0, 19, 28, 41, 51, 67, 81, 89}

func (i ContextType) String() string {
	if i >= ContextType(len(_ContextType_index)-1) {
		return "ContextType(" + strconv.FormatInt(int64(i), 10) + ")"
	}
	return _ContextType_name[_ContextType_index[i]:_ContextType_index[i+1]]
}