Add GetEnvironment() - Fixes #1126

This commit is contained in:
Lea Anthony 2022-02-04 07:52:45 +11:00
commit 082af614ff
4 changed files with 40 additions and 0 deletions

View file

@ -66,3 +66,16 @@ func Quit(ctx context.Context) {
appFrontend := getFrontend(ctx)
appFrontend.Quit()
}
type EnvironmentInfo struct {
BuildType string `json:"buildtype"`
}
func Environment(ctx context.Context) EnvironmentInfo {
var result EnvironmentInfo
buildType := ctx.Value("buildtype")
if buildType != nil {
result.BuildType = buildType.(string)
}
return result
}