mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 14:45:49 +01:00
Add GetEnvironment() - Fixes #1126
This commit is contained in:
parent
0c6864c7ed
commit
082af614ff
4 changed files with 40 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue