github.com/blend/go-sdk@v1.20220411.3/env/is_prodlike.go (about) 1 /* 2 3 Copyright (c) 2022 - Present. Blend Labs, Inc. All rights reserved 4 Use of this source code is governed by a MIT license that can be found in the LICENSE file. 5 6 */ 7 8 package env 9 10 // IsProduction returns if the environment is production. 11 func IsProduction(serviceEnv string) bool { 12 switch serviceEnv { 13 case ServiceEnvPreprod, ServiceEnvProd: 14 return true 15 default: 16 return false 17 } 18 } 19 20 // IsProdlike returns if the environment is prodlike. 21 func IsProdlike(serviceEnv string) bool { 22 switch serviceEnv { 23 case ServiceEnvDev, ServiceEnvCI, ServiceEnvTest, ServiceEnvSandbox: 24 return false 25 default: 26 return true 27 } 28 }