mirror of
https://github.com/mjl-/mox.git
synced 2025-07-13 11:34:37 +03:00
update to go1.23 and replace golang.org/x/exp/maps with stdlib maps
This commit is contained in:
@ -6,14 +6,14 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"maps"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"slices"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"golang.org/x/exp/maps"
|
||||
|
||||
"github.com/mjl-/mox/mlog"
|
||||
)
|
||||
|
||||
@ -182,7 +182,7 @@ func (mr *MboxReader) Next() (*Message, *os.File, string, error) {
|
||||
return nil, nil, mr.Position(), fmt.Errorf("flush: %v", err)
|
||||
}
|
||||
|
||||
m := &Message{Flags: flags, Keywords: maps.Keys(keywords), Size: size}
|
||||
m := &Message{Flags: flags, Keywords: slices.Sorted(maps.Keys(keywords)), Size: size}
|
||||
|
||||
if t := strings.SplitN(fromLine, " ", 3); len(t) == 3 {
|
||||
layouts := []string{time.ANSIC, time.UnixDate, time.RubyDate}
|
||||
@ -357,7 +357,7 @@ func (mr *MaildirReader) Next() (*Message, *os.File, string, error) {
|
||||
}
|
||||
}
|
||||
|
||||
m := &Message{Received: received, Flags: flags, Keywords: maps.Keys(keywords), Size: size}
|
||||
m := &Message{Received: received, Flags: flags, Keywords: slices.Sorted(maps.Keys(keywords)), Size: size}
|
||||
|
||||
// Prevent cleanup by defer.
|
||||
mf := f
|
||||
|
Reference in New Issue
Block a user