From 6b29c59cd99adaefbdde81ca2983fd3e4ba2cc04 Mon Sep 17 00:00:00 2001 From: Christian Banse Date: Mon, 9 Oct 2023 22:01:10 +0200 Subject: [PATCH] Switched to connectrpc.com/connect package import --- CONTRIBUTING.md | 2 +- gen/portfoliov1connect/mgo.connect.go | 2 +- go.mod | 2 +- go.sum | 4 ++-- repl/commands/portfolio.go | 2 +- repl/commands/securities.go | 2 +- service/internal/crud/crud_requests.go | 2 +- service/internal/crud/crud_requests_test.go | 2 +- service/portfolio/portfolio.go | 2 +- service/portfolio/portfolio_test.go | 2 +- service/portfolio/snapshot.go | 2 +- service/portfolio/snapshot_test.go | 2 +- service/portfolio/transactions.go | 2 +- service/portfolio/transactions_test.go | 2 +- service/securities/quote.go | 2 +- service/securities/quote_test.go | 2 +- service/securities/securities.go | 2 +- service/securities/securities_test.go | 2 +- 18 files changed, 19 insertions(+), 19 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5eac38a7..04a1683c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,7 +15,7 @@ automatically built and and tested using GitHub Actions. ## Dependencies We want to keep the amount of dependencies minimal. `golang/x` packages are fair -game, we need `github.com/bufbuild/connect-go` and `google.golang.org/protobuf`. +game, we need `connectrpc.com/connect` and `google.golang.org/protobuf`. We also probably need some kind of assertion library for testing. For everything else (logging, database) we stick to the Go standard library for now, however we need to import an SQL driver, like `modernc.org/sqlite`. diff --git a/gen/portfoliov1connect/mgo.connect.go b/gen/portfoliov1connect/mgo.connect.go index ca172d4e..ae3bc00b 100644 --- a/gen/portfoliov1connect/mgo.connect.go +++ b/gen/portfoliov1connect/mgo.connect.go @@ -7,7 +7,7 @@ package portfoliov1connect import ( context "context" errors "errors" - connect_go "github.com/bufbuild/connect-go" + connect_go "connectrpc.com/connect" gen "github.com/oxisto/money-gopher/gen" emptypb "google.golang.org/protobuf/types/known/emptypb" http "net/http" diff --git a/go.mod b/go.mod index 456f3ad2..24435eb6 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/oxisto/money-gopher go 1.21 require ( - github.com/bufbuild/connect-go v1.10.0 + connectrpc.com/connect v1.10.1 github.com/mattn/go-sqlite3 v1.14.17 github.com/oxisto/assert v0.0.6 golang.org/x/net v0.16.0 diff --git a/go.sum b/go.sum index 262555c1..01511f98 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/bufbuild/connect-go v1.10.0 h1:QAJ3G9A1OYQW2Jbk3DeoJbkCxuKArrvZgDt47mjdTbg= -github.com/bufbuild/connect-go v1.10.0/go.mod h1:CAIePUgkDR5pAFaylSMtNK45ANQjp9JvpluG20rhpV8= +connectrpc.com/connect v1.10.1 h1:vnoz6AZnSIu8/SGU6458VtrFZFhkEZTqn6xgAzMS5og= +connectrpc.com/connect v1.10.1/go.mod h1:ARfc9N8ifAehhTXIVUG5effZoJ5DG9ATm6/x6kVhvP8= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= diff --git a/repl/commands/portfolio.go b/repl/commands/portfolio.go index 64e6b902..2f7c6ac5 100644 --- a/repl/commands/portfolio.go +++ b/repl/commands/portfolio.go @@ -27,7 +27,7 @@ import ( "github.com/oxisto/money-gopher/gen/portfoliov1connect" "github.com/oxisto/money-gopher/repl" - "github.com/bufbuild/connect-go" + "connectrpc.com/connect" "google.golang.org/protobuf/types/known/timestamppb" ) diff --git a/repl/commands/securities.go b/repl/commands/securities.go index 69d7a6c6..3c6ca8ac 100644 --- a/repl/commands/securities.go +++ b/repl/commands/securities.go @@ -22,7 +22,7 @@ import ( "log" "net/http" - "github.com/bufbuild/connect-go" + "connectrpc.com/connect" portfoliov1 "github.com/oxisto/money-gopher/gen" "github.com/oxisto/money-gopher/gen/portfoliov1connect" "github.com/oxisto/money-gopher/repl" diff --git a/service/internal/crud/crud_requests.go b/service/internal/crud/crud_requests.go index 732daff2..d02b22bc 100644 --- a/service/internal/crud/crud_requests.go +++ b/service/internal/crud/crud_requests.go @@ -22,7 +22,7 @@ package crud import ( "github.com/oxisto/money-gopher/persistence" - "github.com/bufbuild/connect-go" + "connectrpc.com/connect" "google.golang.org/protobuf/types/known/emptypb" ) diff --git a/service/internal/crud/crud_requests_test.go b/service/internal/crud/crud_requests_test.go index 67362ef5..b09335a2 100644 --- a/service/internal/crud/crud_requests_test.go +++ b/service/internal/crud/crud_requests_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - "github.com/bufbuild/connect-go" + "connectrpc.com/connect" "github.com/oxisto/assert" portfoliov1 "github.com/oxisto/money-gopher/gen" "github.com/oxisto/money-gopher/internal" diff --git a/service/portfolio/portfolio.go b/service/portfolio/portfolio.go index cb1185dc..17a1557f 100644 --- a/service/portfolio/portfolio.go +++ b/service/portfolio/portfolio.go @@ -23,7 +23,7 @@ import ( "github.com/oxisto/money-gopher/service/internal/crud" "google.golang.org/protobuf/types/known/emptypb" - "github.com/bufbuild/connect-go" + "connectrpc.com/connect" ) var portfolioSetter = func(obj *portfoliov1.Portfolio) *portfoliov1.Portfolio { diff --git a/service/portfolio/portfolio_test.go b/service/portfolio/portfolio_test.go index 37d4f020..e6e40bfb 100644 --- a/service/portfolio/portfolio_test.go +++ b/service/portfolio/portfolio_test.go @@ -21,7 +21,7 @@ import ( "testing" "time" - "github.com/bufbuild/connect-go" + "connectrpc.com/connect" "github.com/oxisto/assert" portfoliov1 "github.com/oxisto/money-gopher/gen" "github.com/oxisto/money-gopher/gen/portfoliov1connect" diff --git a/service/portfolio/snapshot.go b/service/portfolio/snapshot.go index 604d319c..c723f789 100644 --- a/service/portfolio/snapshot.go +++ b/service/portfolio/snapshot.go @@ -23,7 +23,7 @@ import ( "github.com/oxisto/money-gopher/finance" portfoliov1 "github.com/oxisto/money-gopher/gen" - "github.com/bufbuild/connect-go" + "connectrpc.com/connect" "google.golang.org/protobuf/types/known/timestamppb" ) diff --git a/service/portfolio/snapshot_test.go b/service/portfolio/snapshot_test.go index 3a1550c4..6260a0de 100644 --- a/service/portfolio/snapshot_test.go +++ b/service/portfolio/snapshot_test.go @@ -32,7 +32,7 @@ import ( "google.golang.org/protobuf/types/known/emptypb" "google.golang.org/protobuf/types/known/timestamppb" - "github.com/bufbuild/connect-go" + "connectrpc.com/connect" ) var mockSecuritiesClientWithData = &mockSecuritiesClient{ diff --git a/service/portfolio/transactions.go b/service/portfolio/transactions.go index d3c2ab68..de8d1b58 100644 --- a/service/portfolio/transactions.go +++ b/service/portfolio/transactions.go @@ -24,7 +24,7 @@ import ( "github.com/oxisto/money-gopher/import/csv" "github.com/oxisto/money-gopher/service/internal/crud" - "github.com/bufbuild/connect-go" + "connectrpc.com/connect" "google.golang.org/protobuf/types/known/emptypb" ) diff --git a/service/portfolio/transactions_test.go b/service/portfolio/transactions_test.go index f8eee4a6..f0f02115 100644 --- a/service/portfolio/transactions_test.go +++ b/service/portfolio/transactions_test.go @@ -20,7 +20,7 @@ import ( "context" "testing" - "github.com/bufbuild/connect-go" + "connectrpc.com/connect" "github.com/oxisto/assert" portfoliov1 "github.com/oxisto/money-gopher/gen" "github.com/oxisto/money-gopher/gen/portfoliov1connect" diff --git a/service/securities/quote.go b/service/securities/quote.go index f24ce88c..f0007d77 100644 --- a/service/securities/quote.go +++ b/service/securities/quote.go @@ -24,7 +24,7 @@ import ( portfoliov1 "github.com/oxisto/money-gopher/gen" "google.golang.org/protobuf/types/known/timestamppb" - "github.com/bufbuild/connect-go" + "connectrpc.com/connect" ) func (svc *service) TriggerSecurityQuoteUpdate(ctx context.Context, req *connect.Request[portfoliov1.TriggerQuoteUpdateRequest]) (res *connect.Response[portfoliov1.TriggerQuoteUpdateResponse], err error) { diff --git a/service/securities/quote_test.go b/service/securities/quote_test.go index 380088d5..e0b4c1f9 100644 --- a/service/securities/quote_test.go +++ b/service/securities/quote_test.go @@ -21,7 +21,7 @@ import ( "testing" "time" - "github.com/bufbuild/connect-go" + "connectrpc.com/connect" "github.com/oxisto/assert" portfoliov1 "github.com/oxisto/money-gopher/gen" "github.com/oxisto/money-gopher/internal" diff --git a/service/securities/securities.go b/service/securities/securities.go index 9fabdd23..dc7299a5 100644 --- a/service/securities/securities.go +++ b/service/securities/securities.go @@ -23,7 +23,7 @@ import ( portfoliov1 "github.com/oxisto/money-gopher/gen" "github.com/oxisto/money-gopher/service/internal/crud" - "github.com/bufbuild/connect-go" + "connectrpc.com/connect" "google.golang.org/protobuf/types/known/emptypb" ) diff --git a/service/securities/securities_test.go b/service/securities/securities_test.go index 3ae89409..b9f3452f 100644 --- a/service/securities/securities_test.go +++ b/service/securities/securities_test.go @@ -20,7 +20,7 @@ import ( "context" "testing" - "github.com/bufbuild/connect-go" + "connectrpc.com/connect" "github.com/oxisto/assert" portfoliov1 "github.com/oxisto/money-gopher/gen" "github.com/oxisto/money-gopher/gen/portfoliov1connect"