From e02e3e49a1ef8a1138c948e4a944d507545dbe5c Mon Sep 17 00:00:00 2001
From: Kevin Lyda <kevin@lyda.ie>
Date: Mon, 26 May 2025 22:06:17 +0100
Subject: [PATCH] More doc fixes

---
 repl/command.go  | 1 -
 repl/folders.go  | 1 -
 repl/help.go     | 1 -
 repl/mail.go     | 9 +++------
 repl/messages.go | 3 +--
 repl/misc.go     | 1 -
 repl/repl.go     | 3 ++-
 repl/set.go      | 1 -
 repl/show.go     | 1 -
 repl/xfer.go     | 1 -
 10 files changed, 6 insertions(+), 16 deletions(-)

diff --git a/repl/command.go b/repl/command.go
index 316875b..e0949db 100644
--- a/repl/command.go
+++ b/repl/command.go
@@ -1,4 +1,3 @@
-// Package repl implements the main event loop.
 package repl
 
 import "git.lyda.ie/kevin/bulletin/dclish"
diff --git a/repl/folders.go b/repl/folders.go
index 7f385af..4f09a6f 100644
--- a/repl/folders.go
+++ b/repl/folders.go
@@ -1,4 +1,3 @@
-// Package repl implements the main event loop.
 package repl
 
 import (
diff --git a/repl/help.go b/repl/help.go
index e2d9c81..16b7131 100644
--- a/repl/help.go
+++ b/repl/help.go
@@ -1,4 +1,3 @@
-// Package repl implements the main event loop.
 package repl
 
 import (
diff --git a/repl/mail.go b/repl/mail.go
index addac2a..cf43205 100644
--- a/repl/mail.go
+++ b/repl/mail.go
@@ -8,18 +8,15 @@ import (
 
 // ActionForward handles the `FORWARD` command.
 func ActionForward(_ *dclish.Command) error {
-	errors.New("Mail system is not yet implemented (see issue 9)")
-	return nil
+	return errors.New("Mail system is not yet implemented (see issue 9)")
 }
 
 // ActionMail handles the `MAIL` command.
 func ActionMail(_ *dclish.Command) error {
-	errors.New("Mail system is not yet implemented (see issue 9)")
-	return nil
+	return errors.New("Mail system is not yet implemented (see issue 9)")
 }
 
 // ActionRespond handles the `RESPOND` command.
 func ActionRespond(_ *dclish.Command) error {
-	errors.New("Mail system is not yet implemented (see issue 9)")
-	return nil
+	return errors.New("Mail system is not yet implemented (see issue 9)")
 }
diff --git a/repl/messages.go b/repl/messages.go
index 7e2dc32..a201afb 100644
--- a/repl/messages.go
+++ b/repl/messages.go
@@ -1,4 +1,3 @@
-// Package repl implements the main event loop.
 package repl
 
 import (
@@ -716,7 +715,7 @@ func ActionSearch(cmd *dclish.Command) error {
 	}
 
 	allMsgs := []storage.Message{}
-	msgs := []storage.Message{}
+	var msgs []storage.Message
 	var start int64
 	for i := range optFolders {
 		switch optStart {
diff --git a/repl/misc.go b/repl/misc.go
index edd0a01..fe91c60 100644
--- a/repl/misc.go
+++ b/repl/misc.go
@@ -1,4 +1,3 @@
-// Package repl implements the main event loop.
 package repl
 
 import (
diff --git a/repl/repl.go b/repl/repl.go
index 1f69333..3756497 100644
--- a/repl/repl.go
+++ b/repl/repl.go
@@ -1,4 +1,5 @@
-// Package repl implements the main event loop.
+// Package repl defines the [dclish] commands and implements the actions
+// and defines the REPL to get the commands.
 package repl
 
 import (
diff --git a/repl/set.go b/repl/set.go
index 6a9d2a8..cda7390 100644
--- a/repl/set.go
+++ b/repl/set.go
@@ -1,4 +1,3 @@
-// Package repl implements the main event loop.
 package repl
 
 import (
diff --git a/repl/show.go b/repl/show.go
index 639b504..8d59e59 100644
--- a/repl/show.go
+++ b/repl/show.go
@@ -1,4 +1,3 @@
-// Package repl implements the main event loop.
 package repl
 
 import (
diff --git a/repl/xfer.go b/repl/xfer.go
index 997a356..ebd2cf2 100644
--- a/repl/xfer.go
+++ b/repl/xfer.go
@@ -1,4 +1,3 @@
-// Package repl implements the main event loop.
 package repl
 
 import (
-- 
GitLab