diff options
Diffstat (limited to 'utils')
-rw-r--r-- | utils/config.go | 6 | ||||
-rw-r--r-- | utils/lru.go | 8 | ||||
-rw-r--r-- | utils/lru_test.go | 8 |
3 files changed, 17 insertions, 5 deletions
diff --git a/utils/config.go b/utils/config.go index 23bd3e85a..eb2ae3050 100644 --- a/utils/config.go +++ b/utils/config.go @@ -98,7 +98,7 @@ type PrivacySettings struct { type TeamSettings struct { MaxUsersPerTeam int AllowPublicLink bool - AllowValet bool + AllowValetDefault bool TermsLink string PrivacyLink string AboutLink string @@ -221,6 +221,10 @@ func LoadConfig(fileName string) { // Grabs the domain from enviroment variable if not in configuration if config.ServiceSettings.Domain == "" { config.ServiceSettings.Domain = os.Getenv("MATTERMOST_DOMAIN") + // If the enviroment variable is not set, use a default + if config.ServiceSettings.Domain == "" { + config.ServiceSettings.Domain = "localhost" + } } // Check for a valid email for feedback, if not then do feedback@domain diff --git a/utils/lru.go b/utils/lru.go index 9e47c3de3..61a515e14 100644 --- a/utils/lru.go +++ b/utils/lru.go @@ -1,5 +1,9 @@ -// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved. -// See License.txt for license information. +// This files was copied/modified from https://github.com/hashicorp/golang-lru +// which was (see below) + +// This package provides a simple LRU cache. It is based on the +// LRU implementation in groupcache: +// https://github.com/golang/groupcache/tree/master/lru package utils diff --git a/utils/lru_test.go b/utils/lru_test.go index e26af032f..3255f5c1a 100644 --- a/utils/lru_test.go +++ b/utils/lru_test.go @@ -1,5 +1,9 @@ -// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved. -// See License.txt for license information. +// This files was copied/modified from https://github.com/hashicorp/golang-lru +// which was (see below) + +// This package provides a simple LRU cache. It is based on the +// LRU implementation in groupcache: +// https://github.com/golang/groupcache/tree/master/lru package utils |