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 /tileflags_string.go | |
parent | 425da65ed46061303604610bb539d6495b2b1f3f (diff) |
Add String methods to some types using stringer and fix some minor defects
Diffstat (limited to 'tileflags_string.go')
-rw-r--r-- | tileflags_string.go | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/tileflags_string.go b/tileflags_string.go new file mode 100644 index 0000000..f442303 --- /dev/null +++ b/tileflags_string.go @@ -0,0 +1,47 @@ +// Code generated by "stringer -type TileFlags"; 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[TileBackfaceCull-1] + _ = x[TileAbleH-2] + _ = x[TileAbleV-4] + _ = x[TileColor-8] + _ = x[TileScale-16] + _ = x[TileAlign-32] +} + +const ( + _TileFlags_name_0 = "TileBackfaceCullTileAbleH" + _TileFlags_name_1 = "TileAbleV" + _TileFlags_name_2 = "TileColor" + _TileFlags_name_3 = "TileScale" + _TileFlags_name_4 = "TileAlign" +) + +var ( + _TileFlags_index_0 = [...]uint8{0, 16, 25} +) + +func (i TileFlags) String() string { + switch { + case 1 <= i && i <= 2: + i -= 1 + return _TileFlags_name_0[_TileFlags_index_0[i]:_TileFlags_index_0[i+1]] + case i == 4: + return _TileFlags_name_1 + case i == 8: + return _TileFlags_name_2 + case i == 16: + return _TileFlags_name_3 + case i == 32: + return _TileFlags_name_4 + default: + return "TileFlags(" + strconv.FormatInt(int64(i), 10) + ")" + } +} |