File: zstring.go

package info (click to toggle)
elvish 0.21.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,372 kB
  • sloc: javascript: 236; sh: 130; python: 104; makefile: 88; xml: 9
file content (76 lines) | stat: -rw-r--r-- 2,082 bytes parent folder | download | duplicates (2)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
// Code generated by "stringer -type=Config,Arity,ContextType -output=zstring.go"; DO NOT EDIT.

package getopt

import "strconv"

func _() {
	// An "invalid array index" compiler error signifies that the constant values have changed.
	// Re-run the stringer command to generate them again.
	var x [1]struct{}
	_ = x[StopAfterDoubleDash-1]
	_ = x[StopBeforeFirstNonOption-2]
	_ = x[LongOnly-4]
}

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

var (
	_Config_index_0 = [...]uint8{0, 19, 43}
)

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) + ")"
	}
}
func _() {
	// An "invalid array index" compiler error signifies that the constant values have changed.
	// Re-run the stringer command to generate them again.
	var x [1]struct{}
	_ = x[NoArgument-0]
	_ = x[RequiredArgument-1]
	_ = x[OptionalArgument-2]
}

const _Arity_name = "NoArgumentRequiredArgumentOptionalArgument"

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

func (i Arity) String() string {
	if i >= Arity(len(_Arity_index)-1) {
		return "Arity(" + strconv.FormatInt(int64(i), 10) + ")"
	}
	return _Arity_name[_Arity_index[i]:_Arity_index[i+1]]
}
func _() {
	// An "invalid array index" compiler error signifies that the constant values have changed.
	// Re-run the stringer command to generate them again.
	var x [1]struct{}
	_ = x[OptionOrArgument-0]
	_ = x[AnyOption-1]
	_ = x[LongOption-2]
	_ = x[ChainShortOption-3]
	_ = x[OptionArgument-4]
	_ = x[Argument-5]
}

const _ContextType_name = "OptionOrArgumentAnyOptionLongOptionChainShortOptionOptionArgumentArgument"

var _ContextType_index = [...]uint8{0, 16, 25, 35, 51, 65, 73}

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]]
}