dict-iterator.go: NewDictIteratorA() and description comment
This commit is contained in:
@@ -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) {
|
func NewDictIterator(dict *dict.DictType, args []any) (it *DictIterator, err error) {
|
||||||
var sortType = sortTypeNone
|
var sortType = sortTypeNone
|
||||||
var s string
|
var s string
|
||||||
|
|||||||
Reference in New Issue
Block a user