Skip to content

Commit

Permalink
all: replace exp/maps and exp/slices with base packages
Browse files Browse the repository at this point in the history
Since we wrote this code, the maps and slices packages have been promoted to
mainline and expanded, so we no longer need to depend on x/exp for them.
  • Loading branch information
creachadair committed Feb 4, 2025
1 parent 6b75f96 commit 6e42a4d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ package db
import (
"errors"
"fmt"
"slices"
"strings"
"sync"

"github.com/tailscale/setec/acl"
"github.com/tailscale/setec/audit"
"github.com/tailscale/setec/types/api"
"github.com/tink-crypto/tink-go/v2/tink"
"golang.org/x/exp/slices"
"tailscale.com/util/multierr"
)

Expand Down
7 changes: 3 additions & 4 deletions db/kv.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ import (
"errors"
"fmt"
"io/fs"
"maps"
"os"
"slices"
"sort"

"golang.org/x/exp/maps"
"golang.org/x/exp/slices"

"github.com/tailscale/setec/types/api"
"github.com/tink-crypto/tink-go/v2/aead"
"github.com/tink-crypto/tink-go/v2/keyset"
Expand Down Expand Up @@ -266,7 +265,7 @@ func (kv *kv) writeGen() uint64 {

// list returns a list of all secret names in kv.
func (kv *kv) list() []string {
ret := maps.Keys(kv.secrets)
ret := slices.Collect(maps.Keys(kv.secrets))
sort.Strings(ret)
return ret
}
Expand Down

0 comments on commit 6e42a4d

Please sign in to comment.