Created
September 11, 2017 07:33
-
-
Save rogpeppe/1b9c92de93c75595bbb0af1bd9c59128 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// isHTTPS reports whether the configuration | |
// is configured to use HTTPS. | |
func (config Config) isHTTPS() bool { | |
// Ignore any URL parsing error as that'll | |
// be handled by other code paths. | |
configURL, _ := url.Parse(config.URL) | |
return configURL != nil && configURL.Scheme == "https" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment