mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
[runtime] Add cancelation of bound method calls and context passing
This commit is contained in:
+8
-1
@@ -1,9 +1,11 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
_ "embed"
|
||||
"github.com/wailsapp/wails/v3/pkg/application"
|
||||
"log"
|
||||
|
||||
"github.com/wailsapp/wails/v3/pkg/application"
|
||||
)
|
||||
|
||||
// GreetService is great
|
||||
@@ -17,6 +19,11 @@ func (*GreetService) Greet(name string) string {
|
||||
return "Hello " + name
|
||||
}
|
||||
|
||||
// Greet someone
|
||||
func (*GreetService) GreetWithContext(ctx context.Context, name string) string {
|
||||
return "Hello " + name
|
||||
}
|
||||
|
||||
func NewGreetService() *GreetService {
|
||||
return &GreetService{}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user