From cc55f9e613a0dc1e523b4dcdb002babc571bf6a3 Mon Sep 17 00:00:00 2001 From: Hidetatz Yaginuma Date: Sun, 30 Jul 2023 12:50:45 +0900 Subject: [PATCH] apply formatter --- dict.go | 8 ++++---- error.go | 2 +- iterator.go | 2 +- obj.go | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dict.go b/dict.go index 3df3c2f..261e31b 100644 --- a/dict.go +++ b/dict.go @@ -8,10 +8,10 @@ import ( // dict is an ordered dictionary implementation. // In shiba dict is always ordered. type dict struct { - kv map[objkey]*obj // objkey to value - kk map[objkey]*obj // objkey to key - keys *list.List // objkey list - ke map[objkey]*list.Element // objkey to list element. this is needed to delete in O(1) + kv map[objkey]*obj // objkey to value + kk map[objkey]*obj // objkey to key + keys *list.List // objkey list + ke map[objkey]*list.Element // objkey to list element. this is needed to delete in O(1) } func newdict() *dict { diff --git a/error.go b/error.go index 8461ec6..587b7d1 100644 --- a/error.go +++ b/error.go @@ -107,7 +107,7 @@ func (e *errInvalidUnaryOp) Error() string { } type errDictKeyNotFound struct { - l *loc + l *loc key *obj } diff --git a/iterator.go b/iterator.go index 9bd0431..7167970 100644 --- a/iterator.go +++ b/iterator.go @@ -64,7 +64,7 @@ func (i *dictIterator) hasnext() bool { func (i *dictIterator) next() (*obj, int) { retkey := i.e.Value.(objkey) // this is objkey(string) - retk := i.d.kk[retkey] // extract key obj by objkey + retk := i.d.kk[retkey] // extract key obj by objkey retidx := i.i i.e = i.e.Next() i.i++ diff --git a/obj.go b/obj.go index 05498f4..ff6d618 100644 --- a/obj.go +++ b/obj.go @@ -74,7 +74,7 @@ type obj struct { bfnbody func(objs ...*obj) (*obj, error) // func - fmod *module + fmod *module params []string body []node }