1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-17 14:37:02 +00:00

Miscellaneous style fixes

This patch has some miscellaneous style fixes to issues found by the
staticcheck tool.

There are no functional changes.
This commit is contained in:
Alberto Bertogli
2019-02-10 12:46:15 +00:00
parent 582da79eca
commit ec95131bb4
6 changed files with 8 additions and 27 deletions

View File

@@ -13,30 +13,12 @@ import (
"blitiri.com.ar/go/chasquid/internal/testlib"
)
// Test courier. Delivery is done by sending on a channel, so users have fine
// grain control over the results.
type ChanCourier struct {
requests chan deliverRequest
results chan error
}
type deliverRequest struct {
from string
to string
data []byte
}
func (cc *ChanCourier) Deliver(from string, to string, data []byte) (error, bool) {
cc.requests <- deliverRequest{from, to, data}
return <-cc.results, false
}
func newChanCourier() *ChanCourier {
return &ChanCourier{
requests: make(chan deliverRequest),
results: make(chan error),
}
}
// Courier for test purposes. Never fails, and always remembers everything.
type TestCourier struct {
wg sync.WaitGroup