5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 15:11:53 +08:00
wails/v3/internal/parser/testdata/variable_single_from_function/main.go
Adam Tenderholt 0f80f031fd
v3 parser: add some more test cases (functions) (#2422)
* [v3] add test case for parser (create struct from func)

* [v3] add another test case for parser (func in other pkg) + misc
2023-02-26 07:46:26 +11:00

41 lines
573 B
Go

package main
import (
_ "embed"
"github.com/wailsapp/wails/v3/pkg/application"
"log"
)
// GreetService is great
type GreetService struct {
SomeVariable int
lowerCase string
}
// Greet someone
func (*GreetService) Greet(name string) string {
return "Hello " + name
}
func NewGreetService() *GreetService {
return &GreetService{}
}
func main() {
greetService := NewGreetService()
app := application.New(application.Options{
Bind: []interface{}{
greetService,
},
})
app.NewWebviewWindow()
err := app.Run()
if err != nil {
log.Fatal(err)
}
}