11package imap
22
33import (
4+ "slices"
45 "strings"
56
6- "golang.org/x/exp/maps"
7- "golang.org/x/exp/slices"
7+ "github.com/ProtonMail/gluon/pkg/utils"
88)
99
1010const (
@@ -70,7 +70,7 @@ func (fs FlagSet) Len() int {
7070// ToSlice Returns the list of flags in the set as a sorted string slice. The returned list is a hard copy of the internal
7171// slice to avoid direct modifications of the FlagSet value that would break the uniqueness and case insensitivity rules.
7272func (fs FlagSet ) ToSlice () []string {
73- flags := maps .Values (fs )
73+ flags := utils .Values (fs )
7474
7575 slices .Sort (flags )
7676
@@ -79,7 +79,7 @@ func (fs FlagSet) ToSlice() []string {
7979
8080// ToSliceUnsorted is the same as ToSlice, but does not sort the returned value.
8181func (fs FlagSet ) ToSliceUnsorted () []string {
82- return maps .Values (fs )
82+ return utils .Values (fs )
8383}
8484
8585// Contains returns true if and only if the flag is in the set.
@@ -146,11 +146,11 @@ func (fs FlagSet) AddToSelf(flags ...string) {
146146}
147147
148148func (fs FlagSet ) AddFlagSet (set FlagSet ) FlagSet {
149- return fs .Add (maps .Values (set )... )
149+ return fs .Add (utils .Values (set )... )
150150}
151151
152152func (fs FlagSet ) AddFlagSetToSelf (set FlagSet ) {
153- fs .add (maps .Values (set )... )
153+ fs .add (utils .Values (set )... )
154154}
155155
156156func (fs FlagSet ) add (flags ... string ) {
@@ -191,15 +191,15 @@ func (fs FlagSet) Remove(flags ...string) FlagSet {
191191}
192192
193193func (fs FlagSet ) RemoveFlagSet (set FlagSet ) FlagSet {
194- return fs .Remove (maps .Values (set )... )
194+ return fs .Remove (utils .Values (set )... )
195195}
196196
197197func (fs FlagSet ) RemoveFromSelf (flags ... string ) {
198198 fs .remove (flags ... )
199199}
200200
201201func (fs FlagSet ) RemoveFlagSetFromSelf (set FlagSet ) {
202- fs .Remove (maps .Values (set )... )
202+ fs .Remove (utils .Values (set )... )
203203}
204204
205205func (fs FlagSet ) remove (flags ... string ) {
0 commit comments