aboutsummaryrefslogtreecommitdiffstats
path: root/commands/compose
diff options
context:
space:
mode:
authorMoritz Poldrack <git@moritz.sh>2022-07-31 22:16:40 +0200
committerRobin Jarry <robin@jarry.cc>2022-08-01 10:44:52 +0200
commitaaf0a0c65673db4b94c0dc200d7394a192128da1 (patch)
tree44940936efff55b49a6d359d053f55c7ab824e4d /commands/compose
parent21dcd440f877192af128c00ca2acbabf68bb3ee3 (diff)
downloadaerc-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 'commands/compose')
-rw-r--r--commands/compose/compose.go4
-rw-r--r--commands/compose/header.go24
-rw-r--r--commands/compose/send.go7
3 files changed, 15 insertions, 20 deletions
diff --git a/commands/compose/compose.go b/commands/compose/compose.go
index 563dcd1b..f325e4e2 100644
--- a/commands/compose/compose.go
+++ b/commands/compose/compose.go
@@ -4,9 +4,7 @@ import (
"git.sr.ht/~rjarry/aerc/commands"
)
-var (
- ComposeCommands *commands.Commands
-)
+var ComposeCommands *commands.Commands
func register(cmd commands.Command) {
if ComposeCommands == nil {
diff --git a/commands/compose/header.go b/commands/compose/header.go
index ca5c8698..dcee9aac 100644
--- a/commands/compose/header.go
+++ b/commands/compose/header.go
@@ -12,17 +12,15 @@ import (
type Header struct{}
-var (
- headers = []string{
- "From",
- "To",
- "Cc",
- "Bcc",
- "Subject",
- "Comments",
- "Keywords",
- }
-)
+var headers = []string{
+ "From",
+ "To",
+ "Cc",
+ "Bcc",
+ "Subject",
+ "Comments",
+ "Keywords",
+}
func init() {
register(Header{})
@@ -50,9 +48,7 @@ func (Header) Execute(aerc *widgets.Aerc, args []string) error {
return errors.New("command parsing failed")
}
- var (
- force bool = false
- )
+ var force bool = false
for _, opt := range opts {
switch opt.Option {
case 'f':
diff --git a/commands/compose/send.go b/commands/compose/send.go
index 5448b728..2bd61119 100644
--- a/commands/compose/send.go
+++ b/commands/compose/send.go
@@ -111,7 +111,7 @@ func (Send) Execute(aerc *widgets.Aerc, args []string) error {
var copyBuf bytes.Buffer // for the Sent folder content if CopyTo is set
failCh := make(chan error)
- //writer
+ // writer
go func() {
defer logging.PanicHandler()
@@ -144,7 +144,7 @@ func (Send) Execute(aerc *widgets.Aerc, args []string) error {
failCh <- sender.Close()
}()
- //cleanup + copy to sent
+ // cleanup + copy to sent
go func() {
defer logging.PanicHandler()
@@ -431,7 +431,8 @@ func connectSmtps(host string) (*smtp.Client, error) {
}
func copyToSent(worker *types.Worker, dest string,
- n int, msg io.Reader) <-chan error {
+ n int, msg io.Reader,
+) <-chan error {
errCh := make(chan error)
worker.PostAction(&types.AppendMessage{
Destination: dest,