diff options
author | anon5 <anon5clam@protonmail.com> | 2021-06-22 16:30:50 +0000 |
---|---|---|
committer | anon5 <anon5clam@protonmail.com> | 2021-06-22 16:30:50 +0000 |
commit | f967a747e4ae01fba3a6c3fd693d0e753faf3ae4 (patch) | |
tree | 22d628df079bb5cac93cc2338cfbe585ff8a2763 /authmethods_string.go | |
parent | 425da65ed46061303604610bb539d6495b2b1f3f (diff) |
Add String methods to some types using stringer and fix some minor defects
Diffstat (limited to 'authmethods_string.go')
-rw-r--r-- | authmethods_string.go | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/authmethods_string.go b/authmethods_string.go new file mode 100644 index 0000000..a235e62 --- /dev/null +++ b/authmethods_string.go @@ -0,0 +1,35 @@ +// Code generated by "stringer -type AuthMethods"; 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[LegacyPasswd-1] + _ = x[SRP-2] + _ = x[FirstSRP-4] +} + +const ( + _AuthMethods_name_0 = "LegacyPasswdSRP" + _AuthMethods_name_1 = "FirstSRP" +) + +var ( + _AuthMethods_index_0 = [...]uint8{0, 12, 15} +) + +func (i AuthMethods) String() string { + switch { + case 1 <= i && i <= 2: + i -= 1 + return _AuthMethods_name_0[_AuthMethods_index_0[i]:_AuthMethods_index_0[i+1]] + case i == 4: + return _AuthMethods_name_1 + default: + return "AuthMethods(" + strconv.FormatInt(int64(i), 10) + ")" + } +} |