diff options
author | Pavlo Strokov <pstrokov@gitlab.com> | 2021-07-11 20:13:28 +0300 |
---|---|---|
committer | Pavlo Strokov <pstrokov@gitlab.com> | 2021-07-12 15:03:40 +0300 |
commit | f6be3b5535d1111078002b3657c22f7ae3148713 (patch) | |
tree | acceec4af7fae8067ab329715f84438ee22d8a47 /client | |
parent | 745145608d93908b9ad2c8018093c3c12ae793bc (diff) |
Standardise package aliases
It is not common to use snake case names for packages
and package aliases in Go.
The change renames aliases to a preferred single word name.
We also use 'gitaly' prefix for the project-defined packages
that clashes with standard or 3-rd party package names.
Diffstat (limited to 'client')
-rw-r--r-- | client/dial_test.go | 4 | ||||
-rw-r--r-- | client/pool_test.go | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/client/dial_test.go b/client/dial_test.go index ac8e26f0f..e1b2de2ce 100644 --- a/client/dial_test.go +++ b/client/dial_test.go @@ -19,7 +19,7 @@ import ( proxytestdata "gitlab.com/gitlab-org/gitaly/v14/internal/praefect/grpc-proxy/testdata" "gitlab.com/gitlab-org/gitaly/v14/internal/testhelper" "gitlab.com/gitlab-org/gitaly/v14/internal/testhelper/testassert" - gitaly_x509 "gitlab.com/gitlab-org/gitaly/v14/internal/x509" + gitalyx509 "gitlab.com/gitlab-org/gitaly/v14/internal/x509" "gitlab.com/gitlab-org/labkit/correlation" grpccorrelation "gitlab.com/gitlab-org/labkit/correlation/grpc" grpctracing "gitlab.com/gitlab-org/labkit/tracing/grpc" @@ -123,7 +123,7 @@ func TestDial(t *testing.T) { } if tt.envSSLCertFile != "" { - defer testhelper.ModifyEnvironment(t, gitaly_x509.SSLCertFile, tt.envSSLCertFile)() + defer testhelper.ModifyEnvironment(t, gitalyx509.SSLCertFile, tt.envSSLCertFile)() } ctx, cancel := testhelper.Context() diff --git a/client/pool_test.go b/client/pool_test.go index 18bb48ea4..d07994168 100644 --- a/client/pool_test.go +++ b/client/pool_test.go @@ -7,12 +7,12 @@ import ( "testing" "time" - grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware" + grpcmw "github.com/grpc-ecosystem/go-grpc-middleware" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" gitalyauth "gitlab.com/gitlab-org/gitaly/v14/auth" "gitlab.com/gitlab-org/gitaly/v14/internal/bootstrap/starter" - gitaly_auth "gitlab.com/gitlab-org/gitaly/v14/internal/gitaly/config/auth" + gitalycfgauth "gitlab.com/gitlab-org/gitaly/v14/internal/gitaly/config/auth" "gitlab.com/gitlab-org/gitaly/v14/internal/gitaly/server/auth" "gitlab.com/gitlab-org/gitaly/v14/internal/testhelper" "google.golang.org/grpc" @@ -183,13 +183,13 @@ func runServerWithAddr(t *testing.T, creds, addr string) (*health.Server, string var opts []grpc.ServerOption if creds != "" { opts = []grpc.ServerOption{ - grpc.StreamInterceptor(grpc_middleware.ChainStreamServer( - auth.StreamServerInterceptor(gitaly_auth.Config{ + grpc.StreamInterceptor(grpcmw.ChainStreamServer( + auth.StreamServerInterceptor(gitalycfgauth.Config{ Token: creds, }), )), - grpc.UnaryInterceptor(grpc_middleware.ChainUnaryServer( - auth.UnaryServerInterceptor(gitaly_auth.Config{ + grpc.UnaryInterceptor(grpcmw.ChainUnaryServer( + auth.UnaryServerInterceptor(gitalycfgauth.Config{ Token: creds, }), )), |