mirror of
https://github.com/mjl-/mox.git
synced 2025-07-19 02:06:38 +03:00
Run modernize to rewrite some older go constructs to newer ones
Mostly using slice.Sort, using min/max, slices.Concat, range of int and fmt.Appendf for byte slices instead of strings.
This commit is contained in:
@ -20,6 +20,7 @@ import (
|
||||
"github.com/mjl-/mox/queue"
|
||||
"github.com/mjl-/mox/tlsrpt"
|
||||
"github.com/mjl-/mox/tlsrptdb"
|
||||
"slices"
|
||||
)
|
||||
|
||||
var ctxbg = context.Background()
|
||||
@ -423,7 +424,7 @@ func TestSendReports(t *testing.T) {
|
||||
tcheckf(t, err, "read report message")
|
||||
p := fmt.Sprintf("../testdata/tlsrptsend/data/report%d.eml", index)
|
||||
index++
|
||||
err = os.WriteFile(p, append(append([]byte{}, qml[0].MsgPrefix...), buf...), 0600)
|
||||
err = os.WriteFile(p, slices.Concat(qml[0].MsgPrefix, buf), 0600)
|
||||
tcheckf(t, err, "write report message")
|
||||
|
||||
reportJSON, err := tlsrpt.ParseMessage(log.Logger, msgFile)
|
||||
|
Reference in New Issue
Block a user