1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2025-12-07 20:51:42 +00:00

httputil: Add NewClientWithDriver function (#487)

* feat(httputil): add NewFromDriverClient function
* refactor: rename to NewClientWithDriver
This commit is contained in:
Ayyan 2025-09-22 21:41:54 -04:00 committed by GitHub
parent c3dc0bc002
commit 374d28cbf6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -44,8 +44,12 @@ type Client struct {
}
func NewClient() *Client {
return NewClientWithDriver(httpdriver.NewClient())
}
func NewClientWithDriver(driver httpdriver.Client) *Client {
return &Client{
Client: httpdriver.NewClient(),
Client: driver,
SchemaEncoder: &DefaultSchema{},
Retries: Retries,
context: context.Background(),