]> git.lizzy.rs Git - go-anidb.git/blobdiff - groupcache.go
anidb: Simplify documentation
[go-anidb.git] / groupcache.go
index dbf30371ad8c08daa95980b4955820aba83b86bd..6cee34857ce210155a9b8f7ae4b08eb7e87c50b1 100644 (file)
@@ -56,10 +56,7 @@ func (c *gidCache) IsStale() bool {
        return true
 }
 
-// Returns a Group from the cache if possible.
-//
-// If the Group is stale, then retrieves the Group
-// through the UDP API.
+// Retrieves a Group by its GID.
 func (adb *AniDB) GroupByID(gid GID) <-chan *Group {
        keys := []cacheKey{"gid", gid}
        ch := make(chan *Group, 1)
@@ -101,6 +98,7 @@ func (adb *AniDB) GroupByID(gid GID) <-chan *Group {
        return ch
 }
 
+// Retrieves a Group by its name. Either full or short names are matched.
 func (adb *AniDB) GroupByName(gname string) <-chan *Group {
        keys := []cacheKey{"gid", "by-name", gname}
        altKeys := []cacheKey{"gid", "by-shortname", gname}