From 2b0d0f8bdb8b27540de654d08d85e0271adf420d Mon Sep 17 00:00:00 2001 From: Nick Dumas Date: Sat, 24 Jun 2023 15:09:55 -0400 Subject: [PATCH] Stringer for ItemType --- itemtype_string.go | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 itemtype_string.go diff --git a/itemtype_string.go b/itemtype_string.go new file mode 100644 index 0000000..4209011 --- /dev/null +++ b/itemtype_string.go @@ -0,0 +1,29 @@ +// Code generated by "stringer -type=ItemType"; DO NOT EDIT. + +package wikilink + +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[ItemError-0] + _ = x[ItemEOF-1] + _ = x[ItemText-2] + _ = x[ItemOpenLink-3] + _ = x[ItemCloseLink-4] + _ = x[ItemFragment-5] + _ = x[ItemAlias-6] +} + +const _ItemType_name = "ItemErrorItemEOFItemTextItemOpenLinkItemCloseLinkItemFragmentItemAlias" + +var _ItemType_index = [...]uint8{0, 9, 16, 24, 36, 49, 61, 70} + +func (i ItemType) String() string { + if i < 0 || i >= ItemType(len(_ItemType_index)-1) { + return "ItemType(" + strconv.FormatInt(int64(i), 10) + ")" + } + return _ItemType_name[_ItemType_index[i]:_ItemType_index[i+1]] +}