- Fix window/service.go: replace 3 fmt.Errorf calls with coreerr.E() (removes implicit fmt dependency)
- Add usage-example comments to all bare Register() functions across 10 packages
- Remove redundant prose comments (Options/Service/Register/OnStartup/HandleIPCEvents boilerplate)
- Add Result-type comments to message types in contextmenu, keybinding, notification packages
- Fix test naming to TestFilename_Function_{Good,Bad,Ugly} pattern in display_test, window_test, persistence_test, service_screen_test
- Convert New() and CreateWindowOptions doc comments to usage-example style
Co-Authored-By: Virgil <virgil@lethean.io>
15 lines
439 B
Go
15 lines
439 B
Go
package window
|
|
|
|
import "forge.lthn.ai/core/go/pkg/core"
|
|
|
|
// Register(p) binds the window service to a Core instance.
|
|
// core.WithService(window.Register(window.NewWailsPlatform(app)))
|
|
func Register(p Platform) func(*core.Core) (any, error) {
|
|
return func(c *core.Core) (any, error) {
|
|
return &Service{
|
|
ServiceRuntime: core.NewServiceRuntime[Options](c, Options{}),
|
|
platform: p,
|
|
manager: NewManager(p),
|
|
}, nil
|
|
}
|
|
}
|