Skip to content

Commit f042a0c

Browse files
committed
refactor: Address Go staticcheck warnings in non-GTK libraries
Signed-off-by: Felicitas Pojtinger <felicitas@pojtinger.com>
1 parent a45b7ef commit f042a0c

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

internal/components/controls.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ func OpenControlsWindow(
485485

486486
app.AddWindow(&window.Window)
487487

488-
s := make(chan os.Signal)
488+
s := make(chan os.Signal, 1)
489489
signal.Notify(s, os.Interrupt, syscall.SIGTERM)
490490
go func() {
491491
<-s

main.go

-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@ package main
22

33
import (
44
"context"
5-
"math/rand"
65
"net"
76
"os"
87
"path/filepath"
98
"strings"
10-
"time"
119

1210
"github.com/diamondburned/gotk4-adwaita/pkg/adw"
1311
"github.com/diamondburned/gotk4/pkg/gdk/v4"
@@ -123,8 +121,6 @@ func main() {
123121
}
124122
addr.Port = port
125123

126-
rand.Seed(time.Now().UnixNano())
127-
128124
if err := os.MkdirAll(settings.String(resources.GSchemaStorageKey), os.ModePerm); err != nil {
129125
panic(err)
130126
}

0 commit comments

Comments
 (0)