Cleanup
This commit is contained in:
17
utils/production.go
Normal file
17
utils/production.go
Normal 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()
|
||||
}
|
Reference in New Issue
Block a user