Go, Go Context! Added context transfer literally everywhere

This commit is contained in:
ErickSkrauch
2024-02-13 02:08:42 +01:00
parent fdafbc4f0e
commit f5bc474b4d
21 changed files with 209 additions and 246 deletions

View File

@@ -9,7 +9,7 @@ import (
)
type ProfilesFinder interface {
FindProfileByUsername(username string) (*db.Profile, error)
FindProfileByUsername(ctx context.Context, username string) (*db.Profile, error)
}
type MojangProfilesProvider interface {
@@ -22,7 +22,7 @@ type Provider struct {
}
func (p *Provider) FindProfileByUsername(ctx context.Context, username string, allowProxy bool) (*db.Profile, error) {
profile, err := p.ProfilesFinder.FindProfileByUsername(username)
profile, err := p.ProfilesFinder.FindProfileByUsername(ctx, username)
if err != nil {
return nil, err
}