[chore] lint fixes

This commit is contained in:
Lea Anthony
2023-11-12 12:30:49 +11:00
parent d88a741ce7
commit 9ce0ddb4f8
107 changed files with 312 additions and 355 deletions
+1
View File
@@ -3,6 +3,7 @@ package runtime
import (
"context"
"fmt"
"github.com/wailsapp/wails/v2/internal/frontend"
"github.com/wailsapp/wails/v2/internal/fs"
)
+2 -2
View File
@@ -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()
+1
View File
@@ -3,6 +3,7 @@ package runtime
import (
"context"
"fmt"
"github.com/wailsapp/wails/v2/pkg/logger"
)
+1
View File
@@ -2,6 +2,7 @@ package runtime
import (
"context"
"github.com/wailsapp/wails/v2/pkg/menu"
)
+1
View File
@@ -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)
+5 -2
View File
@@ -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