diff options
author | anon5 <anon5clam@protonmail.com> | 2021-09-19 12:45:50 +0000 |
---|---|---|
committer | anon5 <anon5clam@protonmail.com> | 2021-09-19 12:45:50 +0000 |
commit | bcc58cb3048faa146ed0f90b330ebbe791d53b5c (patch) | |
tree | 2373852a0557ea584a62134159eb646b15619be3 /stack.go | |
parent | d6ba88b091f6c9be3b48ab0fe3f94211ee210700 (diff) | |
download | mt-bcc58cb3048faa146ed0f90b330ebbe791d53b5c.tar.xz |
Switch to Minetest 5.4.1 protocol and other changes
Diffstat (limited to 'stack.go')
-rw-r--r-- | stack.go | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -1,6 +1,6 @@ // In this file, JSON refers to WTF-JSON. // -// BUG(mt): Itemstrings use variant of JSON called WTF-JSON +// BUG(mt): Stackstrings use variant of JSON called WTF-JSON // where \u00XX escapes in string literals act like Go's \xXX escapes. // This should not be fixed because it would break existing items. @@ -25,10 +25,7 @@ type Item struct { ItemMeta } -// String returns the Stack's itemstring. -// -// BUG(mt): The term itemstring is somewhat misleading, because -// an itemstring represents a stack of items, not a single item. +// String returns the Stack's stackstring. func (s Stack) String() string { if s.Count == 0 { return "" @@ -90,7 +87,7 @@ func jsonStr(s string) string { return b.String() } -// Scan scans an itemstring, implementing the fmt.Scanner interface. +// Scan scans a stackstring, implementing the fmt.Scanner interface. func (stk *Stack) Scan(state fmt.ScanState, verb rune) (err error) { *stk = Stack{} |