Skip to content

Commit

Permalink
Upgrade go-functional to v2
Browse files Browse the repository at this point in the history
  • Loading branch information
BooleanCat committed Jul 17, 2024
1 parent 838b922 commit 6977ae6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
7 changes: 4 additions & 3 deletions api/repositories/service_broker_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import (
"code.cloudfoundry.org/korifi/controllers/controllers/services/credentials"
"code.cloudfoundry.org/korifi/model"
"code.cloudfoundry.org/korifi/model/services"
"github.com/BooleanCat/go-functional/iter"
"github.com/BooleanCat/go-functional/v2/it"
"github.com/BooleanCat/go-functional/v2/it/itx"
"github.com/google/uuid"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/meta"
Expand Down Expand Up @@ -165,7 +166,7 @@ func (r *ServiceBrokerRepo) ListServiceBrokers(ctx context.Context, authInfo aut
return nil, fmt.Errorf("failed to list brokers: %w", apierrors.FromK8sError(err, ServiceBrokerResourceType))
}

brokers := iter.Lift(brokersList.Items).Filter(message.matches)
brokers := itx.From(slices.Values(brokersList.Items)).Filter(message.matches)

return iter.Map(brokers, toServiceBrokerResource).Collect(), nil
return slices.Collect(it.Map(brokers, toServiceBrokerResource)), nil
}
6 changes: 2 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
module code.cloudfoundry.org/korifi

go 1.22.4

toolchain go1.22.5
go 1.23

require (
code.cloudfoundry.org/bytefmt v0.0.0-20211005130812-5bb3c17173e5
code.cloudfoundry.org/go-loggregator/v8 v8.0.5
github.com/BooleanCat/go-functional v1.1.0
github.com/BooleanCat/go-functional/v2 v2.0.0-beta.1
github.com/Masterminds/semver v1.5.0
github.com/PaesslerAG/jsonpath v0.1.1
github.com/SermoDigital/jose v0.9.2-0.20161205224733-f6df55f235c2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+Z
github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8=
github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo=
github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU=
github.com/BooleanCat/go-functional v1.1.0 h1:ZU8ejc2u/71I5LZbI5qiJI75Ttw1FueLNmoccPt8nDI=
github.com/BooleanCat/go-functional v1.1.0/go.mod h1:Zd1xLrGFohrDdjojLUCrzSex40yf/PVP2KB86ha9Qqg=
github.com/BooleanCat/go-functional/v2 v2.0.0-beta.1 h1:SPpz/l3fLGzqBFFJwaLImeQjvkgMcsH9JFVBXTrtqsk=
github.com/BooleanCat/go-functional/v2 v2.0.0-beta.1/go.mod h1:IpUUAXAc9CiWDb+YDXkJyyUhtOVqDtyICDRg/de1IaQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8=
github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
Expand Down

0 comments on commit 6977ae6

Please sign in to comment.