2017-06-17 01:12:28 +02:00

18 lines
323 B
Go

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()
}