Other: require go 1.18 and update to golangci-lint to latest revision + fixes.

This commit is contained in:
Xavier Michelon
2022-07-25 16:29:48 +02:00
committed by Jakub
parent 62a589b6ad
commit 0a1f349901
13 changed files with 96 additions and 37 deletions

View File

@ -34,14 +34,14 @@ func detectSystemTheme() Theme {
}
path := filepath.Join(home, "/Library/Preferences/.GlobalPreferences.plist")
prefFile, err := os.Open(path)
prefFile, err := os.Open(path) //nolint:gosec // file is safe
if err != nil {
return Light
}
defer prefFile.Close()
defer func() { _ = prefFile.Close() }()
var data struct {
AppleInterfaceStyle string `plist:AppleInterfaceStyle`
AppleInterfaceStyle string `plist:"AppleInterfaceStyle"`
}
dec := plist.NewDecoder(prefFile)