Created
December 17, 2016 04:43
-
-
Save sinmetal/a0d6874e7c885d15ab77d3dc2ee37863 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package cpt | |
import ( | |
"google.golang.org/appengine" | |
"golang.org/x/net/context" | |
) | |
// IsProduction is Production環境で動いていればtrueを返す | |
func IsProduction(c context.Context) bool { | |
appID := appengine.AppID(c) | |
return appID == "training-topgate" | |
} | |
// IsStaging is Staging環境で動いていればtrueを返す | |
func IsStaging(c context.Context) bool { | |
appID := appengine.AppID(c) | |
return appID == "training-topgate-dev" | |
} | |
// IsDevAppServer is DevAppServerで動いていればtrueを返す | |
func IsDevAppServer(c context.Context) bool { | |
return appengine.IsDevAppServer() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment