diff options
author | Moritz Poldrack <git@moritz.sh> | 2022-07-31 22:16:40 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-08-01 10:44:52 +0200 |
commit | aaf0a0c65673db4b94c0dc200d7394a192128da1 (patch) | |
tree | 44940936efff55b49a6d359d053f55c7ab824e4d /lib/crypto | |
parent | 21dcd440f877192af128c00ca2acbabf68bb3ee3 (diff) | |
download | aerc-aaf0a0c65673db4b94c0dc200d7394a192128da1.tar.gz |
lint: apply new formatting rules
Run `make fmt`.
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'lib/crypto')
-rw-r--r-- | lib/crypto/gpg/gpg.go | 1 | ||||
-rw-r--r-- | lib/crypto/gpg/gpgbin/encrypt.go | 2 | ||||
-rw-r--r-- | lib/crypto/pgp/pgp.go | 6 |
3 files changed, 4 insertions, 5 deletions
diff --git a/lib/crypto/gpg/gpg.go b/lib/crypto/gpg/gpg.go index e545e1c9..c73272a3 100644 --- a/lib/crypto/gpg/gpg.go +++ b/lib/crypto/gpg/gpg.go @@ -37,7 +37,6 @@ func (m *Mail) ImportKeys(r io.Reader) error { } func (m *Mail) Encrypt(buf *bytes.Buffer, rcpts []string, signer string, decryptKeys openpgp.PromptFunction, header *mail.Header) (io.WriteCloser, error) { - return Encrypt(buf, header.Header.Header, rcpts, signer) } diff --git a/lib/crypto/gpg/gpgbin/encrypt.go b/lib/crypto/gpg/gpgbin/encrypt.go index e72ba148..31245a74 100644 --- a/lib/crypto/gpg/gpgbin/encrypt.go +++ b/lib/crypto/gpg/gpgbin/encrypt.go @@ -11,7 +11,7 @@ import ( // Encrypt runs gpg --encrypt [--sign] -r [recipient]. The default is to have // --trust-model always set func Encrypt(r io.Reader, to []string, from string) ([]byte, error) { - //TODO probably shouldn't have --trust-model always a default + // TODO probably shouldn't have --trust-model always a default args := []string{ "--armor", "--trust-model", "always", diff --git a/lib/crypto/pgp/pgp.go b/lib/crypto/pgp/pgp.go index 647b091b..c305f068 100644 --- a/lib/crypto/pgp/pgp.go +++ b/lib/crypto/pgp/pgp.go @@ -31,10 +31,10 @@ var ( func (m *Mail) Init() error { logging.Infof("Initializing PGP keyring") - os.MkdirAll(path.Join(xdg.DataHome(), "aerc"), 0700) + os.MkdirAll(path.Join(xdg.DataHome(), "aerc"), 0o700) lockpath := path.Join(xdg.DataHome(), "aerc", "keyring.lock") - lockfile, err := os.OpenFile(lockpath, os.O_CREATE|os.O_EXCL, 0600) + lockfile, err := os.OpenFile(lockpath, os.O_CREATE|os.O_EXCL, 0o600) if err != nil { // TODO: Consider connecting to main process over IPC socket locked = false @@ -149,7 +149,7 @@ func (m *Mail) ImportKeys(r io.Reader) error { Keyring = append(Keyring, keys...) if locked { keypath := path.Join(xdg.DataHome(), "aerc", "keyring.asc") - keyfile, err := os.OpenFile(keypath, os.O_CREATE|os.O_APPEND, 0600) + keyfile, err := os.OpenFile(keypath, os.O_CREATE|os.O_APPEND, 0o600) if err != nil { return err } |