This commit is contained in:
2017-06-17 01:12:28 +02:00
parent 4e02a8f4bc
commit a9f88db566
9 changed files with 154 additions and 154 deletions

17
utils/production.go Normal file
View File

@ -0,0 +1,17 @@
package utils
import (
"os"
"strings"
)
// IsProduction returns true if the hostname contains "arn".
func IsProduction() bool {
host, _ := os.Hostname()
return strings.Contains(host, "arn")
}
// IsDevelopment returns true if the hostname does not contain "arn".
func IsDevelopment() bool {
return !IsProduction()
}