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

* Gather and document service API * Update changelog * Add NewServiceWithOptions * Revert static analyser change * Remove infinite loop in NewService[WithOptions] * Fix compiler warning in bindings command * Add test for NewServiceWithOptions * Update changelog * Fix service example --------- Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
15 lines
337 B
Go
15 lines
337 B
Go
package main
|
|
|
|
import "github.com/wailsapp/wails/v3/pkg/application"
|
|
|
|
func ServiceInitialiser[T any]() func(*T) application.Service {
|
|
return application.NewService[T]
|
|
}
|
|
|
|
func CustomNewServices[T any, U any]() []application.Service {
|
|
return []application.Service{
|
|
application.NewService(new(T)),
|
|
application.NewService(new(U)),
|
|
}
|
|
}
|