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

@ -40,7 +40,7 @@ const (
venturaPreferencesPane = "x-apple.systempreferences:com.apple.preferences.configurationprofiles"
)
func init() { //nolint:gochecknoinit
func init() { //nolint:gochecknoinits
available[AppleMailClient] = &appleMail{}
}
@ -66,7 +66,7 @@ func (c *appleMail) Configure(imapPort, smtpPort int, imapSSL, smtpSSL bool, use
return execabs.Command("open", prefPane, confPath).Run() //nolint:gosec // G204 open command is safe, mobileconfig is generated by us
}
return execabs.Command("open", confPath).Run() //nolint:gosec G204: open command is safe, mobileconfig is generated by us
return execabs.Command("open", confPath).Run() //nolint:gosec // G204 open command is safe, mobileconfig is generated by us
}
func prepareMobileConfig(imapPort, smtpPort int, imapSSL, smtpSSL bool, user types.User, address string) *mobileconfig.Config {
@ -114,7 +114,7 @@ func saveConfigTemporarily(mc *mobileconfig.Config) (fname string, err error) {
// Make sure the file is only readable for the current user.
fname = filepath.Clean(filepath.Join(dir, "protonmail.mobileconfig"))
f, err := os.OpenFile(fname, os.O_RDWR|os.O_CREATE, 0o600)
f, err := os.OpenFile(fname, os.O_RDWR|os.O_CREATE, 0o600) //nolint:gosec
if err != nil {
return
}