Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ require (
go.opentelemetry.io/otel/trace v1.38.0
go.uber.org/mock v0.6.0
golang.org/x/crypto v0.42.0
golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f
golang.org/x/mod v0.28.0
golang.org/x/net v0.44.0
golang.org/x/sync v0.17.0
Expand All @@ -108,6 +107,7 @@ require (
github.com/invopop/jsonschema v0.13.0 // indirect
github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect
github.com/yosida95/uritemplate/v3 v3.0.2 // indirect
golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f // indirect
)

require (
Expand Down
2 changes: 1 addition & 1 deletion internal/command/command_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"os"
"path"
"path/filepath"
"slices"
"strconv"
"strings"

Expand All @@ -17,7 +18,6 @@ import (
"github.com/samber/lo"
fly "github.com/superfly/fly-go"
"github.com/superfly/flyctl/iostreams"
"golang.org/x/exp/slices"

"github.com/superfly/flyctl/internal/appconfig"
"github.com/superfly/flyctl/internal/build/imgsrc"
Expand Down
4 changes: 2 additions & 2 deletions internal/command/deploy/machines.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"encoding/json"
"fmt"
"maps"
"slices"
"strings"
"sync"
Expand All @@ -27,7 +28,6 @@ import (
"github.com/superfly/flyctl/terminal"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"
"golang.org/x/exp/maps"
)

const (
Expand Down Expand Up @@ -412,7 +412,7 @@ func (md *machineDeployment) setMachinesForDeployment(ctx context.Context) error
s = "s"
}

filtersAppliedStr := strings.Join(maps.Keys(filtersApplied), "/")
filtersAppliedStr := strings.Join(slices.Collect(maps.Keys(filtersApplied)), "/")

fmt.Fprintf(md.io.ErrOut, "%s filter%s applied, deploying to %d/%d machines\n", filtersAppliedStr, s, len(machines), nMachines)
}
Expand Down
4 changes: 2 additions & 2 deletions internal/command/deploy/machines_deploymachinesapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"context"
"errors"
"fmt"
"maps"
"math"
"net"
"slices"
Expand Down Expand Up @@ -32,7 +33,6 @@ import (
"github.com/superfly/flyctl/terminal"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"
"golang.org/x/exp/maps"
"golang.org/x/sync/errgroup"
)

Expand Down Expand Up @@ -326,7 +326,7 @@ func (md *machineDeployment) deployCanaryMachines(ctx context.Context) (err erro
func (md *machineDeployment) deployCreateMachinesForGroups(ctx context.Context, processGroupMachineDiff ProcessGroupsDiff) (err error) {
groupsWithAutostopEnabled := make(map[string]bool)
groupsWithAutosuspendEnabled := make(map[string]bool)
groups := maps.Keys(processGroupMachineDiff.groupsNeedingMachines)
groups := slices.Collect(maps.Keys(processGroupMachineDiff.groupsNeedingMachines))
total := len(groups)
slices.Sort(groups)

Expand Down
2 changes: 1 addition & 1 deletion internal/command/redis/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"context"
"errors"
"fmt"
"slices"

"github.com/spf13/cobra"
"golang.org/x/exp/slices"

fly "github.com/superfly/fly-go"
"github.com/superfly/flyctl/gql"
Expand Down
4 changes: 2 additions & 2 deletions internal/command/scale/count.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package scale
import (
"context"
"fmt"
"maps"
"slices"
"strconv"
"strings"
Expand All @@ -16,7 +17,6 @@ import (
"github.com/superfly/flyctl/internal/flag"
"github.com/superfly/flyctl/internal/flag/completion"
"github.com/superfly/flyctl/internal/flapsutil"
"golang.org/x/exp/maps"
)

func newScaleCount() *cobra.Command {
Expand Down Expand Up @@ -75,7 +75,7 @@ func runScaleCount(ctx context.Context) error {
return err
}

unknownNames := lo.Filter(maps.Keys(groups), func(x string, _ int) bool {
unknownNames := lo.Filter(slices.Collect(maps.Keys(groups)), func(x string, _ int) bool {
return !slices.Contains(processNames, x)
})
if len(unknownNames) > 0 {
Expand Down
2 changes: 1 addition & 1 deletion internal/command/version/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import (
"fmt"
"os"
"os/exec"
"slices"
"strings"

"github.com/samber/lo"
"github.com/spf13/cobra"
"github.com/superfly/flyctl/terminal"
"golang.org/x/exp/slices"

"github.com/superfly/flyctl/internal/buildinfo"
"github.com/superfly/flyctl/internal/cache"
Expand Down
4 changes: 2 additions & 2 deletions internal/config/tokens.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"
"maps"
"slices"
"strconv"
"strings"
Expand All @@ -18,7 +19,6 @@ import (
"github.com/superfly/flyctl/internal/task"
"github.com/superfly/macaroon"
"github.com/superfly/macaroon/flyio"
"golang.org/x/exp/maps"
)

// UserURLCallback is a function that opens a URL in the user's browser. This is
Expand Down Expand Up @@ -288,7 +288,7 @@ func doFetchOrgTokens(ctx context.Context, t *tokens.Tokens, fetchOrgs orgFetche
defer wgLock.Unlock()
macToks = append(macToks, m)
}
for _, graphID := range maps.Values(graphIDByNumericID) {
for graphID := range maps.Values(graphIDByNumericID) {
graphID := graphID

wg.Add(1)
Expand Down
2 changes: 1 addition & 1 deletion internal/haikunator/haikunator.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"crypto/rand"
"math/big"
rand2 "math/rand"
"slices"
"strconv"
"strings"

"github.com/superfly/flyctl/helpers"
"golang.org/x/exp/slices"
)

var adjectives = strings.Fields(`
Expand Down
2 changes: 1 addition & 1 deletion internal/machine/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ package machine
import (
"context"
"fmt"
"maps"
"slices"
"time"

fly "github.com/superfly/fly-go"
"github.com/superfly/flyctl/internal/flapsutil"
"github.com/superfly/flyctl/internal/watch"
"github.com/superfly/flyctl/iostreams"
"golang.org/x/exp/maps"
)

var cpusPerKind = map[string][]int{
Expand Down
2 changes: 1 addition & 1 deletion internal/set/set_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package set

import (
"slices"
"testing"

"github.com/stretchr/testify/assert"
"golang.org/x/exp/slices"
)

func TestSet(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/version/version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package version
import (
"encoding/json"
"math/rand"
"slices"
"testing"
"time"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"golang.org/x/exp/slices"
)

func TestEncode(t *testing.T) {
Expand Down
Loading