mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-21 11:29:29 +08:00

* Add some clarifying comments * Remove special handling of window parameters * Improve internal method exclusion * Add test for internal method exclusion * Remove useless blank field from app options This is a leftover from an older version of the static analyser. It should have been removed long ago. * Remove redundant godebug setting gotypesalias=1 is the default starting with go1.23 * Use new range for syntax to simplify code * Remove generator dependency on github.com/samber/lo * Ensure generator testing tasks do not use the test cache * Rename cyclic types test * Test for cyclic imports * Fix import cycle between model files * Sort class aliases after their aliased class * Test class aliases * Fix length of default value for array types * Test array initialization * Add changelog * Update changelog * Fix contrived marking technique in model sorting algorithm * Update binding example * Update test data --------- Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
56 lines
704 B
Go
56 lines
704 B
Go
package main
|
|
|
|
import (
|
|
_ "embed"
|
|
"log"
|
|
|
|
"github.com/wailsapp/wails/v3/pkg/application"
|
|
)
|
|
|
|
// GreetService is great
|
|
type GreetService int
|
|
|
|
type StructA struct {
|
|
B *structB
|
|
}
|
|
|
|
type structB struct {
|
|
A *StructA
|
|
}
|
|
|
|
type StructC struct {
|
|
D structD
|
|
}
|
|
|
|
type structD struct {
|
|
E StructE
|
|
}
|
|
|
|
type StructE struct{}
|
|
|
|
// Make a cycle.
|
|
func (GreetService) MakeCycles() (_ StructA, _ StructC) {
|
|
return
|
|
}
|
|
|
|
func NewGreetService() application.Service {
|
|
return application.NewService(new(GreetService))
|
|
}
|
|
|
|
func main() {
|
|
app := application.New(application.Options{
|
|
Services: []application.Service{
|
|
NewGreetService(),
|
|
},
|
|
})
|
|
|
|
app.NewWebviewWindow()
|
|
|
|
err := app.Run()
|
|
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
|
|
}
|