-
Is there a way to detect if the code runs in development "wails dev" or in a production build?
couldn't find anywhere. |
Beta Was this translation helpful? Give feedback.
Answered by
lockbot
Dec 14, 2023
Replies: 1 comment
-
import "github.com/wailsapp/wails/v2/pkg/runtime" You can even take the OS and the architecture, which made me stop using standard "runtime" for now. Documentation won't tell you much, but you can test the outputs by panic()ing the startup after running wails dev. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
YairLevi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
import "github.com/wailsapp/wails/v2/pkg/runtime"
...
var ctx context.Context
runtime.Environment(ctx).BuildType
You can even take the OS and the architecture, which made me stop using standard "runtime" for now. Documentation won't tell you much, but you can test the outputs by panic()ing the startup after running wails dev.