Files
wails/test/runtime/main.go
Travis McLane 25a157e661 Squashed 'v2/' content from commit 7d8960e
git-subtree-dir: v2
git-subtree-split: 7d8960e87431924f5705df4c777758a0eb32e145
2020-09-01 19:34:51 -05:00

44 lines
814 B
Go

package main
import (
wails "github.com/leaanthony/wailsv2/v2"
)
type Echo struct {
}
func (e *Echo) Echo(message string) string {
return message
}
func main() {
// Create application with options
app := wails.CreateAppWithOptions(&wails.Options{
Title: "Runtime Tester!",
Width: 850,
Height: 620,
DisableResize: false,
Fullscreen: false,
})
// You can also use the simplified call:
// app := wails.CreateApp("Tester!", 1024, 768)
// ------------- Assets ------------
// assets := wails.Assets()
// textFile, err := assets.Read("hello.txt")
// if err != nil {
// println("Unable to load asset: hello.txt")
// }
// println(textFile)
// ---------------------------------
app.Bind(newCalc("te"))
app.Bind(&Echo{})
app.Bind(&RuntimeTest{})
app.Run()
}