File tree Expand file tree Collapse file tree 7 files changed +51
-17
lines changed Expand file tree Collapse file tree 7 files changed +51
-17
lines changed Original file line number Diff line number Diff line change 11package main
22
33import (
4- _ "embed"
54 "log/slog"
65 "os"
76 "path/filepath"
87)
98
10- // Embed icon files at compile time for better distribution
11- //
12- //go:embed icons/goose.png
13- var iconGoose []byte
14-
15- //go:embed icons/popper.png
16- var iconPopper []byte
17-
18- //go:embed icons/smiling-face.png
19- var iconSmiling []byte
20-
21- //go:embed icons/lock.png
22- var iconLock []byte
23-
24- //go:embed icons/warning.png
25- var iconWarning []byte
9+ // Icon variables are defined in platform-specific files:
10+ // - icons_windows.go: uses .ico files
11+ // - icons_unix.go: uses .png files
2612
2713// IconType represents different icon states
2814type IconType int
Original file line number Diff line number Diff line change 1+ //go:build !windows
2+
3+ package main
4+
5+ import (
6+ _ "embed"
7+ )
8+
9+ // Embed PNG files for Unix-like systems (macOS, Linux)
10+ //
11+ //go:embed icons/goose.png
12+ var iconGoose []byte
13+
14+ //go:embed icons/popper.png
15+ var iconPopper []byte
16+
17+ //go:embed icons/smiling-face.png
18+ var iconSmiling []byte
19+
20+ //go:embed icons/lock.png
21+ var iconLock []byte
22+
23+ //go:embed icons/warning.png
24+ var iconWarning []byte
Original file line number Diff line number Diff line change 1+ //go:build windows
2+
3+ package main
4+
5+ import (
6+ _ "embed"
7+ )
8+
9+ // Embed Windows ICO files at compile time
10+ //
11+ //go:embed icons/goose.ico
12+ var iconGoose []byte
13+
14+ //go:embed icons/popper.ico
15+ var iconPopper []byte
16+
17+ //go:embed icons/smiling-face.ico
18+ var iconSmiling []byte
19+
20+ //go:embed icons/warning.ico
21+ var iconWarning []byte
22+
23+ // lock.ico not yet created, using warning as fallback
24+ var iconLock = iconWarning
You can’t perform that action at this time.
0 commit comments