Add 'Users' type to generator

This commit is contained in:
2025-05-21 17:12:14 +04:00
parent 4d5abe66a6
commit bcd721e071
3 changed files with 34 additions and 20 deletions

14
pkg/generator/base.go Normal file
View File

@@ -0,0 +1,14 @@
package generator
import "github.com/aykhans/bsky-feedgen/pkg/utils"
type Users map[string]bool
func (u Users) IsValid(did string) *bool {
isValid, ok := u[did]
if ok == false {
return nil
}
return utils.ToPtr(isValid)
}