MCPcopy
hub / github.com/wailsapp/wails / getFrontend

Function getFrontend

v2/pkg/runtime/runtime.go:15–29  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

13https://wails.io/docs/reference/runtime/intro`
14
15func getFrontend(ctx context.Context) frontend.Frontend {
16 if ctx == nil {
17 pc, _, _, _ := goruntime.Caller(1)
18 funcName := goruntime.FuncForPC(pc).Name()
19 log.Fatalf("cannot call '%s': %s", funcName, contextError)
20 }
21 result := ctx.Value("frontend")
22 if result != nil {
23 return result.(frontend.Frontend)
24 }
25 pc, _, _, _ := goruntime.Caller(1)
26 funcName := goruntime.FuncForPC(pc).Name()
27 log.Fatalf("cannot call '%s': %s", funcName, contextError)
28 return nil
29}
30
31func getLogger(ctx context.Context) *logger.Logger {
32 if ctx == nil {

Callers 15

MenuSetApplicationMenuFunction · 0.85
ScreenGetAllFunction · 0.85
ClipboardGetTextFunction · 0.85
ClipboardSetTextFunction · 0.85
WindowSetTitleFunction · 0.85
WindowFullscreenFunction · 0.85
WindowUnfullscreenFunction · 0.85
WindowCenterFunction · 0.85
WindowReloadFunction · 0.85
WindowReloadAppFunction · 0.85

Calls 2

NameMethod · 0.65
ValueMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…