mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-18 14:47:03 +00:00
Minor style and simplification cleanups
This patch does various minor style and simplification cleanups, fixing things detected by tools such as go vet, gofmt -s, and golint. There are no functional changes, this change is purely cosmetic, but will enable us to run those tools more regularly now that their output is clean.
This commit is contained in:
@@ -26,7 +26,7 @@ const (
|
||||
)
|
||||
|
||||
var (
|
||||
queueFullError = fmt.Errorf("Queue size too big, try again later")
|
||||
errQueueFull = fmt.Errorf("Queue size too big, try again later")
|
||||
)
|
||||
|
||||
// Channel used to get random IDs for items in the queue.
|
||||
@@ -90,7 +90,7 @@ func (q *Queue) Len() int {
|
||||
// Put an envelope in the queue.
|
||||
func (q *Queue) Put(from string, to []string, data []byte) (string, error) {
|
||||
if q.Len() >= maxQueueSize {
|
||||
return "", queueFullError
|
||||
return "", errQueueFull
|
||||
}
|
||||
|
||||
item := &Item{
|
||||
|
||||
Reference in New Issue
Block a user