File: op_string.go

package info (click to toggle)
golang-github-facebook-ent 0.5.4-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 14,284 kB
  • sloc: javascript: 349; makefile: 8
file content (43 lines) | stat: -rw-r--r-- 840 bytes parent folder | download | duplicates (4)
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
// Code generated by "stringer -type Op"; DO NOT EDIT.

package ent

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[OpCreate-1]
	_ = x[OpUpdate-2]
	_ = x[OpUpdateOne-4]
	_ = x[OpDelete-8]
	_ = x[OpDeleteOne-16]
}

const (
	_Op_name_0 = "OpCreateOpUpdate"
	_Op_name_1 = "OpUpdateOne"
	_Op_name_2 = "OpDelete"
	_Op_name_3 = "OpDeleteOne"
)

var (
	_Op_index_0 = [...]uint8{0, 8, 16}
)

func (i Op) String() string {
	switch {
	case 1 <= i && i <= 2:
		i -= 1
		return _Op_name_0[_Op_index_0[i]:_Op_index_0[i+1]]
	case i == 4:
		return _Op_name_1
	case i == 8:
		return _Op_name_2
	case i == 16:
		return _Op_name_3
	default:
		return "Op(" + strconv.FormatInt(int64(i), 10) + ")"
	}
}