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:
parent
c3dc0bc002
commit
374d28cbf6
|
|
@ -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(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue