Skip to content

Commit

Permalink
rm listusersbyprefix
Browse files Browse the repository at this point in the history
  • Loading branch information
leohhhn committed Jan 17, 2025
1 parent b4e441d commit d8624ef
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions examples/gno.land/r/sys/users/users.gno
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"std"

"gno.land/p/demo/avl/rotree"
"gno.land/p/demo/avlhelpers"
)

// ResolveName returns the latest UserData of a specific user by name or alias
Expand Down Expand Up @@ -46,11 +45,3 @@ func GetReadonlyAddrStore() *rotree.ReadOnlyTree {
func GetReadOnlyNameStore() *rotree.ReadOnlyTree {
return rotree.Wrap(nameStore, nil)
}

// UsersByPrefix gets a slice of usernames starting from the given prefix. Limits the
// number of results to maxResults. (This can be used for a name search tool.)
func UsersByPrefix(prefix string, maxResults int) []string {
// XXX: most likely moved to r/gnoland/users to keep this package minimal.
// in that case, should we get a value copy of the uStore available to whitelisted callers?
return avlhelpers.ListByteStringKeysByPrefix(nameStore, prefix, maxResults)
}

0 comments on commit d8624ef

Please sign in to comment.