18 lines
305 B
Go
18 lines
305 B
Go
|
package client
|
||
|
|
||
|
type Option func(*Client) *Client
|
||
|
|
||
|
func WithURL(url string) Option {
|
||
|
return func(client *Client) *Client {
|
||
|
client.url = url
|
||
|
return client
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func WithHeaders(headers map[string]string) Option {
|
||
|
return func(client *Client) *Client {
|
||
|
client.headers = headers
|
||
|
return client
|
||
|
}
|
||
|
}
|