// ParseTimeout returns a parsed duration from a string // A duration string value must be a positive integer, optionally followed by a corresponding time unit (s|m|h). func ParseTimeout(duration string) (time.Duration, error) { … } func parseProxyURL(proxyURL string) (*url.URL, error) { … }