diff options
Diffstat (limited to 'dir_string.go')
-rw-r--r-- | dir_string.go | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/dir_string.go b/dir_string.go new file mode 100644 index 0000000..cd48e1b --- /dev/null +++ b/dir_string.go @@ -0,0 +1,29 @@ +// Code generated by "stringer -type Dir"; 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[East-0] + _ = x[Above-1] + _ = x[North-2] + _ = x[South-3] + _ = x[Below-4] + _ = x[West-5] + _ = x[NoDir-6] +} + +const _Dir_name = "EastAboveNorthSouthBelowWestNoDir" + +var _Dir_index = [...]uint8{0, 4, 9, 14, 19, 24, 28, 33} + +func (i Dir) String() string { + if i >= Dir(len(_Dir_index)-1) { + return "Dir(" + strconv.FormatInt(int64(i), 10) + ")" + } + return _Dir_name[_Dir_index[i]:_Dir_index[i+1]] +} |