mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
[chore] lint fixes
This commit is contained in:
@@ -3,6 +3,7 @@ package runtime
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/wailsapp/wails/v2/internal/frontend"
|
||||
"github.com/wailsapp/wails/v2/internal/fs"
|
||||
)
|
||||
|
||||
@@ -10,7 +10,7 @@ func EventsOn(ctx context.Context, eventName string, callback func(optionalData
|
||||
return events.On(eventName, callback)
|
||||
}
|
||||
|
||||
// EventsOff unregisters a listener for the given event name, optionally multiple listeneres can be unregistered via `additionalEventNames`
|
||||
// EventsOff unregisters a listener for the given event name, optionally multiple listeners can be unregistered via `additionalEventNames`
|
||||
func EventsOff(ctx context.Context, eventName string, additionalEventNames ...string) {
|
||||
events := getEvents(ctx)
|
||||
events.Off(eventName)
|
||||
@@ -22,7 +22,7 @@ func EventsOff(ctx context.Context, eventName string, additionalEventNames ...st
|
||||
}
|
||||
}
|
||||
|
||||
// EventsOff unregisters a listener for the given event name, optionally multiple listeneres can be unregistered via `additionalEventNames`
|
||||
// EventsOff unregisters a listener for the given event name, optionally multiple listeners can be unregistered via `additionalEventNames`
|
||||
func EventsOffAll(ctx context.Context) {
|
||||
events := getEvents(ctx)
|
||||
events.OffAll()
|
||||
|
||||
@@ -3,6 +3,7 @@ package runtime
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/wailsapp/wails/v2/pkg/logger"
|
||||
)
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package runtime
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/wailsapp/wails/v2/pkg/menu"
|
||||
)
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ func getFrontend(ctx context.Context) frontend.Frontend {
|
||||
log.Fatalf("cannot call '%s': %s", funcName, contextError)
|
||||
return nil
|
||||
}
|
||||
|
||||
func getLogger(ctx context.Context) *logger.Logger {
|
||||
if ctx == nil {
|
||||
pc, _, _, _ := goruntime.Caller(1)
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
package runtime
|
||||
|
||||
import "context"
|
||||
import "github.com/wailsapp/wails/v2/internal/frontend"
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/wailsapp/wails/v2/internal/frontend"
|
||||
)
|
||||
|
||||
type Screen = frontend.Screen
|
||||
|
||||
|
||||
Reference in New Issue
Block a user