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,11 +9,11 @@ import (
)
type MojangApiTexturesProvider struct {
MojangApiTexturesEndpoint func(uuid string, signed bool) (*ProfileResponse, error)
MojangApiTexturesEndpoint func(ctx context.Context, uuid string, signed bool) (*ProfileResponse, error)
}
func (p *MojangApiTexturesProvider) GetTextures(ctx context.Context, uuid string) (*ProfileResponse, error) {
return p.MojangApiTexturesEndpoint(uuid, true)
return p.MojangApiTexturesEndpoint(ctx, uuid, true)
}
// Perfectly there should be an object with provider and cache implementation,