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 --- modchansig_string.go | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 modchansig_string.go (limited to 'modchansig_string.go') diff --git a/modchansig_string.go b/modchansig_string.go new file mode 100644 index 0000000..b422d6c --- /dev/null +++ b/modchansig_string.go @@ -0,0 +1,28 @@ +// Code generated by "stringer -type ModChanSig"; 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[JoinOK-0] + _ = x[JoinFail-1] + _ = x[LeaveOK-2] + _ = x[LeaveFail-3] + _ = x[NotRegistered-4] + _ = x[SetState-5] +} + +const _ModChanSig_name = "JoinOKJoinFailLeaveOKLeaveFailNotRegisteredSetState" + +var _ModChanSig_index = [...]uint8{0, 6, 14, 21, 30, 43, 51} + +func (i ModChanSig) String() string { + if i >= ModChanSig(len(_ModChanSig_index)-1) { + return "ModChanSig(" + strconv.FormatInt(int64(i), 10) + ")" + } + return _ModChanSig_name[_ModChanSig_index[i]:_ModChanSig_index[i+1]] +} -- cgit v1.2.3