Skip to content

Commit

Permalink
use standard library "slices" package
Browse files Browse the repository at this point in the history
this was added in go 1.21
  • Loading branch information
crhntr committed Aug 31, 2023
1 parent b143ae8 commit a7d1d9c
Show file tree
Hide file tree
Showing 11 changed files with 8 additions and 14 deletions.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ require (
github.com/snabb/httpreaderat v1.0.1
github.com/stretchr/testify v1.8.4
golang.org/x/crypto v0.12.0
golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb
golang.org/x/oauth2 v0.11.0
golang.org/x/sync v0.3.0
golang.org/x/term v0.11.0
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -712,8 +712,6 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb h1:mIKbk8weKhSeLH2GmUTrvx8CjkyJmnU1wFmg59CUjFA=
golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
Expand Down
3 changes: 1 addition & 2 deletions internal/acceptance/workflows/acceptance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ import (
"os"
"os/exec"
"path/filepath"
"slices"
"strings"
"testing"

"golang.org/x/exp/slices"

"github.com/cucumber/godog"

"github.com/pivotal-cf/kiln/internal/acceptance/workflows/scenario"
Expand Down
2 changes: 1 addition & 1 deletion internal/acceptance/workflows/scenario/initialize_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"os"
"reflect"
"regexp"
"slices"
"sort"
"testing"

"github.com/cucumber/godog"
"golang.org/x/exp/slices"
)

const testTilePath = "../hello-tile"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import (
"fmt"
"os"
"os/exec"
"slices"
"strings"

"github.com/cucumber/godog"
"github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/plumbing"
"golang.org/x/exp/slices"

"github.com/pivotal-cf/kiln/internal/component"
"github.com/pivotal-cf/kiln/pkg/cargo"
Expand Down
1 change: 0 additions & 1 deletion internal/component/artifactory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,6 @@ var _ = Describe("interacting with BOSH releases on Artifactory", func() {
When("a bosh release is not found", func() {
BeforeEach(func() {
artifactoryRouter.NotFound = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {

w.WriteHeader(http.StatusNotFound)
_, _ = fmt.Fprintln(w, `{"errors":[{"status":404,"message":"File not found."}]}`)
})
Expand Down
2 changes: 1 addition & 1 deletion internal/test/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"os/signal"
"path"
"path/filepath"
"slices"
"strings"

"github.com/docker/docker/api/types"
Expand All @@ -32,7 +33,6 @@ import (

"golang.org/x/crypto/ssh"
"golang.org/x/crypto/ssh/agent"
"golang.org/x/exp/slices"
"golang.org/x/term"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/cargo/bosh_release.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"io/fs"
"os"
"path"
"slices"
"strings"

"golang.org/x/exp/slices"
"gopkg.in/yaml.v3"

"github.com/pivotal-cf/kiln/pkg/proofing"
Expand Down
2 changes: 1 addition & 1 deletion pkg/cargo/bump.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ package cargo

import (
"context"
"slices"
"sort"
"strings"
"sync"

"github.com/Masterminds/semver/v3"
"github.com/google/go-github/v40/github"
"golang.org/x/exp/slices"

"github.com/pivotal-cf/kiln/internal/gh"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/cargo/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package cargo

import (
"fmt"
"slices"

"github.com/Masterminds/semver/v3"
"golang.org/x/exp/slices"
)

func Validate(spec Kilnfile, lock KilnfileLock) []error {
Expand Down
3 changes: 1 addition & 2 deletions pkg/proofing/product_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ package proofing

import (
"fmt"

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

type ProductTemplate struct {
Expand Down

0 comments on commit a7d1d9c

Please sign in to comment.