summaryrefslogtreecommitdiff
path: root/stack.go
diff options
context:
space:
mode:
authoranon5 <anon5clam@protonmail.com>2021-09-19 12:45:50 +0000
committeranon5 <anon5clam@protonmail.com>2021-09-19 12:45:50 +0000
commitbcc58cb3048faa146ed0f90b330ebbe791d53b5c (patch)
tree2373852a0557ea584a62134159eb646b15619be3 /stack.go
parentd6ba88b091f6c9be3b48ab0fe3f94211ee210700 (diff)
downloadmt-bcc58cb3048faa146ed0f90b330ebbe791d53b5c.tar.xz
Switch to Minetest 5.4.1 protocol and other changes
Diffstat (limited to 'stack.go')
-rw-r--r--stack.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/stack.go b/stack.go
index d930604..8cf3aa8 100644
--- a/stack.go
+++ b/stack.go
@@ -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{}