aboutsummaryrefslogtreecommitdiff
path: root/internal/cpe/avstringtype_string.go
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2022-02-02 22:38:49 -0500
committerPaul Duncan <pabs@pablotron.org>2022-02-02 22:38:49 -0500
commit5db2e66f30d671f334486ad3dfbb178f4fef6817 (patch)
tree76d4283158637cec083c21ea1831618dee8f2c41 /internal/cpe/avstringtype_string.go
parent8350205a9ea7857a7d00d7f3b1508b882e5cb55d (diff)
downloadcvez-5db2e66f30d671f334486ad3dfbb178f4fef6817.tar.bz2
cvez-5db2e66f30d671f334486ad3dfbb178f4fef6817.zip
internal/cpe: add avstring and tests
Diffstat (limited to 'internal/cpe/avstringtype_string.go')
-rw-r--r--internal/cpe/avstringtype_string.go25
1 files changed, 25 insertions, 0 deletions
diff --git a/internal/cpe/avstringtype_string.go b/internal/cpe/avstringtype_string.go
new file mode 100644
index 0000000..6fb88e1
--- /dev/null
+++ b/internal/cpe/avstringtype_string.go
@@ -0,0 +1,25 @@
+// Code generated by "stringer -linecomment -type=AvStringType"; DO NOT EDIT.
+
+package cpe
+
+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[AnyString-0]
+ _ = x[NaString-1]
+ _ = x[ValString-2]
+}
+
+const _AvStringType_name = "anynaval"
+
+var _AvStringType_index = [...]uint8{0, 3, 5, 8}
+
+func (i AvStringType) String() string {
+ if i >= AvStringType(len(_AvStringType_index)-1) {
+ return "AvStringType(" + strconv.FormatInt(int64(i), 10) + ")"
+ }
+ return _AvStringType_name[_AvStringType_index[i]:_AvStringType_index[i+1]]
+}