From f967a747e4ae01fba3a6c3fd693d0e753faf3ae4 Mon Sep 17 00:00:00 2001 From: anon5 Date: Tue, 22 Jun 2021 16:30:50 +0000 Subject: Add String methods to some types using stringer and fix some minor defects --- hotbarparam_string.go | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 hotbarparam_string.go (limited to 'hotbarparam_string.go') diff --git a/hotbarparam_string.go b/hotbarparam_string.go new file mode 100644 index 0000000..e8552b6 --- /dev/null +++ b/hotbarparam_string.go @@ -0,0 +1,26 @@ +// Code generated by "stringer -trimprefix Hotbar -type HotbarParam"; DO NOT EDIT. + +package mt + +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[HotbarSize-1] + _ = x[HotbarImg-2] + _ = x[HotbarSelImg-3] +} + +const _HotbarParam_name = "SizeImgSelImg" + +var _HotbarParam_index = [...]uint8{0, 4, 7, 13} + +func (i HotbarParam) String() string { + i -= 1 + if i >= HotbarParam(len(_HotbarParam_index)-1) { + return "HotbarParam(" + strconv.FormatInt(int64(i+1), 10) + ")" + } + return _HotbarParam_name[_HotbarParam_index[i]:_HotbarParam_index[i+1]] +} -- cgit v1.2.3