From 72c2a6b52af174c55df1c6cb41e654ecd4f55086 Mon Sep 17 00:00:00 2001 From: Celestino Amoroso Date: Sun, 2 Aug 2026 16:49:59 +0200 Subject: [PATCH] dict-iterator.go: NewDictIteratorA() and description comment --- dict-iterator.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dict-iterator.go b/dict-iterator.go index 0a1ef43..237b500 100644 --- a/dict-iterator.go +++ b/dict-iterator.go @@ -70,6 +70,13 @@ func (it *DictIterator) makeKeys(m map[any]any, sort sortType) { } } +// NewDictIterator creates a new DictIterator for the given dict.DictType and optional arguments. +// The first argument can be a string specifying the sort type ("asc", "desc", "none", or "default"). +// The second argument can be a string specifying the iteration mode ("keys", "values", "items", or "default"). +func NewDictIteratorA(dict *dict.DictType, args ...any) (it *DictIterator, err error) { + return NewDictIterator(dict, args) +} + func NewDictIterator(dict *dict.DictType, args []any) (it *DictIterator, err error) { var sortType = sortTypeNone var s string