Skip to content

Commit

Permalink
remove 1.23+ methods from slices and maps packages
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoandredinis committed Oct 28, 2024
1 parent 8aa3d4d commit 5d043a6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/srv/server/ssm_install.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ import (
"errors"
"fmt"
"log/slog"
"maps"
"slices"
"strings"

"github.com/aws/aws-sdk-go/aws"
Expand Down Expand Up @@ -283,7 +281,11 @@ type instanceIDsSSMState struct {
}

func instanceIDsFrom(m map[string]string) []string {
return slices.Collect(maps.Keys(m))
ret := make([]string, 0, len(m))
for k := range m {
ret = append(ret, k)
}
return ret
}

// describeSSMAgentState returns the instanceIDsSSMState for all the instances.
Expand Down

0 comments on commit 5d043a6

Please sign in to comment.