i wanna inject db into context because ez for meeee
parent
7f4a079d95
commit
fbaaa1303f
|
|
@ -9,6 +9,10 @@ type Storage interface {
|
|||
PlayerIDs(context.Context) ([]int, error)
|
||||
}
|
||||
|
||||
func NewDB(ctx context.Context) (DB, error) {
|
||||
return DB{}, io.EOF
|
||||
}
|
||||
|
||||
type DB struct{}
|
||||
|
||||
func (db DB) PlayerIDs(ctx context.Context) ([]int, error) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue