mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 05:30:22 +08:00
41 lines
535 B
Go
41 lines
535 B
Go
package main
|
|
|
|
import (
|
|
_ "embed"
|
|
"log"
|
|
|
|
"github.com/wailsapp/wails/v3/pkg/application"
|
|
"github.com/wailsapp/wails/v3/pkg/options"
|
|
)
|
|
|
|
type GreetService struct {
|
|
SomeVariable int
|
|
lowerCase string
|
|
}
|
|
|
|
func (*GreetService) Greet(name string) string {
|
|
return "Hello " + name
|
|
}
|
|
|
|
type OtherService struct {
|
|
t int
|
|
}
|
|
|
|
func main() {
|
|
app := application.New(options.Application{
|
|
Bind: []interface{}{
|
|
&GreetService{},
|
|
&OtherService{},
|
|
},
|
|
})
|
|
|
|
app.NewWebviewWindow()
|
|
|
|
err := app.Run()
|
|
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
|
|
}
|