diff options
author | =Corey Hulen <corey@hulen.com> | 2015-10-07 09:25:17 -0700 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-10-07 09:25:17 -0700 |
commit | fea45ad0c570c32bd124abbf7256fae6e2a8bdf6 (patch) | |
tree | f413d20a9039187b48bc13218eefee445772fcb2 /utils | |
parent | dbfc502184a3d6b71ec9c1833a3f5ffa066d7bbb (diff) | |
download | chat-fea45ad0c570c32bd124abbf7256fae6e2a8bdf6.tar.gz chat-fea45ad0c570c32bd124abbf7256fae6e2a8bdf6.tar.bz2 chat-fea45ad0c570c32bd124abbf7256fae6e2a8bdf6.zip |
Moving to url.Values
Diffstat (limited to 'utils')
-rw-r--r-- | utils/diagnostic.go | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/utils/diagnostic.go b/utils/diagnostic.go index 541cd15d2..e40948f62 100644 --- a/utils/diagnostic.go +++ b/utils/diagnostic.go @@ -5,6 +5,7 @@ package utils import ( "net/http" + "net/url" "github.com/mattermost/platform/model" ) @@ -21,19 +22,10 @@ const ( PROP_DIAGNOSTIC_USER_COUNT = "uc" ) -func SendDiagnostic(data model.StringMap) { +func SendDiagnostic(values url.Values) { if Cfg.PrivacySettings.EnableSecurityFixAlert && model.IsOfficalBuild() { - query := "?" - for name, value := range data { - if len(query) > 1 { - query += "&" - } - - query += name + "=" + UrlEncode(value) - } - - res, err := http.Get(DIAGNOSTIC_URL + "/i" + query) + res, err := http.Get(DIAGNOSTIC_URL + "/i?" + values.Encode()) if err != nil { return } |