From 72783f64585ad2381a47bfa96cb7ee824460d5f2 Mon Sep 17 00:00:00 2001 From: Joel Miles Date: Sat, 9 Mar 2019 22:00:21 -0600 Subject: [PATCH] Plural variable naming and slice instead of array --- validation/validation.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/validation/validation.go b/validation/validation.go index 396a6a43..aad5a7f7 100644 --- a/validation/validation.go +++ b/validation/validation.go @@ -14,7 +14,7 @@ import ( const defaultScheme = "http" -var supportedProtocol = [2]string{"http", "https", "rdp"} +var supportedProtocols = []string{"http", "https", "rdp"} func ValidateHostname(hostname string) (string, error) { if hostname == "" { @@ -117,7 +117,7 @@ func ValidateUrl(originUrl string) (string, error) { } func validateScheme(scheme string) error { - for _, protocol := range supportedProtocol { + for _, protocol := range supportedProtocols { if scheme == protocol { return nil }