WithBaseURL returns a new Option that sets the base URL for the client configuration. It takes a string value representing the base URL to use for requests. It returns an optionFunc that sets the baseURL field of the configuration to the provided
(val string)
| 77 | // It takes a string value representing the base URL to use for requests. |
| 78 | // It returns an optionFunc that sets the baseURL field of the configuration to the provided |
| 79 | func WithBaseURL(val string) Option { |
| 80 | return optionFunc(func(c *config) { |
| 81 | c.baseURL = val |
| 82 | }) |
| 83 | } |
| 84 | |
| 85 | // WithTimeout returns a new Option that sets the timeout for the client configuration. |
| 86 | // It takes a time.Duration value representing the timeout duration. |