style nit: only take address of structs when passed on

This commit is contained in:
Mechiel Lukkien
2024-04-14 12:46:24 +02:00
parent 2a949f9f79
commit b7d6540d51
3 changed files with 6 additions and 6 deletions

4
ctl.go
View File

@ -336,13 +336,13 @@ func servectlcmd(ctx context.Context, ctl *ctl, shutdown func()) {
err = msgFile.Sync()
ctl.xcheck(err, "syncing message to storage")
m := &store.Message{
m := store.Message{
Received: time.Now(),
Size: mw.Size,
}
a.WithWLock(func() {
err := a.DeliverDestination(log, addr, m, msgFile)
err := a.DeliverDestination(log, addr, &m, msgFile)
ctl.xcheck(err, "delivering message")
log.Info("message delivered through ctl", slog.Any("to", to))
})