Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUserInfoExists is returned when a join address already contains // a username and a password. ErrUserInfoExists = errors.New("userinfo exists") )
Functions ¶
func AddBasicAuth ¶
AddBasicAuth adds username and password to the join address. If username is empty joinAddr is returned unchanged. If joinAddr already contains a username, ErrUserInfoExists is returned.
func CheckHTTPS ¶
CheckHTTPS returns true if the given URL uses HTTPS.
func EnsureHTTPS ¶
EnsureHTTPS modifies the given URL, ensuring it is using the HTTPS protocol.
func NormalizeAddr ¶
NormalizeAddr ensures that the given URL has a HTTP protocol prefix. If none is supplied, it prefixes the URL with "http://".
func RemoveBasicAuth ¶
RemoveBasicAuth returns a copy of the given URL, with any basic auth password redacted.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.