(ctx context.Context)
| 13 | https://wails.io/docs/reference/runtime/intro` |
| 14 | |
| 15 | func 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 | |
| 31 | func getLogger(ctx context.Context) *logger.Logger { |
| 32 | if ctx == nil { |
no test coverage detected
searching dependent graphs…