sendamatic/options.go

26 lines
394 B
Go
Raw Normal View History

2025-11-18 17:54:34 +01:00
package sendamatic
import (
"net/http"
"time"
)
type Option func(*Client)
func WithBaseURL(baseURL string) Option {
return func(c *Client) {
c.baseURL = baseURL
}
}
func WithHTTPClient(client *http.Client) Option {
return func(c *Client) {
c.httpClient = client
}
}
func WithTimeout(timeout time.Duration) Option {
return func(c *Client) {
c.httpClient.Timeout = timeout
}
}