diff options
author | Corey Hulen <corey@hulen.com> | 2015-07-21 15:46:12 -0800 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2015-07-21 15:46:12 -0800 |
commit | 269185fb0e252e8105d5f143ca104a069ec10c47 (patch) | |
tree | 37eb1f616abcd5a923d8c730b9f7a6d1b5b56f2d /utils | |
parent | 06bac01e882a7b05519d0e39bccafacd0c27c602 (diff) | |
parent | 237920e314f3974880d9913aff69faafbe094107 (diff) | |
download | chat-269185fb0e252e8105d5f143ca104a069ec10c47.tar.gz chat-269185fb0e252e8105d5f143ca104a069ec10c47.tar.bz2 chat-269185fb0e252e8105d5f143ca104a069ec10c47.zip |
Merge pull request #205 from mattermost/mm-1351
fixes mm-1351 adds local server storage
Diffstat (limited to 'utils')
-rw-r--r-- | utils/config.go | 22 | ||||
-rw-r--r-- | utils/urlencode.go | 19 |
2 files changed, 31 insertions, 10 deletions
diff --git a/utils/config.go b/utils/config.go index efa4b263a..e8fa9a477 100644 --- a/utils/config.go +++ b/utils/config.go @@ -18,16 +18,18 @@ const ( ) type ServiceSettings struct { - SiteName string - Mode string - AllowTesting bool - UseSSL bool - Port string - Version string - InviteSalt string - PublicLinkSalt string - ResetSalt string - AnalyticsUrl string + SiteName string + Mode string + AllowTesting bool + UseSSL bool + Port string + Version string + InviteSalt string + PublicLinkSalt string + ResetSalt string + AnalyticsUrl string + UseLocalStorage bool + StorageDirectory string } type SqlSettings struct { diff --git a/utils/urlencode.go b/utils/urlencode.go new file mode 100644 index 000000000..63a8f7880 --- /dev/null +++ b/utils/urlencode.go @@ -0,0 +1,19 @@ +// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved. +// See License.txt for license information. + +package utils + +import ( + "net/url" + "strings" +) + +func UrlEncode(str string) string { + strs := strings.Split(str, " ") + + for i, s := range strs { + strs[i] = url.QueryEscape(s) + } + + return strings.Join(strs, "%20") +} |