Loading README.md +9 −9 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ in a major release version to follow SemVar. For the release 2.0 migration guide ## Usage ```go import "gitlab.com/gitlab-org/api/client-go" import "gitlab.com/gitlab-org/api/client-go/v2" ``` Construct a new GitLab client, then use the various services on the client to Loading Loading @@ -64,7 +64,7 @@ package main import ( "log" "gitlab.com/gitlab-org/api/client-go" "gitlab.com/gitlab-org/api/client-go/v2" ) func main() { Loading Loading @@ -102,7 +102,7 @@ func main() { #### Use OAuth2 helper package The following example demonstrates how to use the `gitlab.com/gitlab-org/api/client-go/oauth2` package: The following example demonstrates how to use the `gitlab.com/gitlab-org/api/client-go/v2/oauth2` package: ```go package main Loading @@ -112,8 +112,8 @@ import ( "fmt" "os/exec" gitlab "gitlab.com/gitlab-org/api/client-go" "gitlab.com/gitlab-org/api/client-go/gitlaboauth2" gitlab "gitlab.com/gitlab-org/api/client-go/v2" "gitlab.com/gitlab-org/api/client-go/v2/gitlaboauth2" ) func main() { Loading Loading @@ -192,8 +192,8 @@ import ( "fmt" "log" "gitlab.com/gitlab-org/api/client-go" "gitlab.com/gitlab-org/api/client-go/config" "gitlab.com/gitlab-org/api/client-go/v2" "gitlab.com/gitlab-org/api/client-go/v2/config" ) func main() { Loading Loading @@ -240,12 +240,12 @@ For complete usage of go-gitlab, see the full [package docs](https://pkg.go.dev/ To install the library, use the following command: ```go go get gitlab.com/gitlab-org/api/client-go go get gitlab.com/gitlab-org/api/client-go/v2 ``` ## Testing The `client-go` project comes with a `testing` package at `gitlab.com/gitlab-org/api/client-go/testing` The `client-go` project comes with a `testing` package at `gitlab.com/gitlab-org/api/client-go/v2/testing` which contains a `TestClient` with [gomock](https://github.com/uber-go/mock) mocks for the individual services. You can use them like this: Loading config/config.go +3 −3 Original line number Diff line number Diff line Loading @@ -27,9 +27,9 @@ import ( "buf.build/go/protovalidate" "buf.build/go/protoyaml" "github.com/zalando/go-keyring" gitlab "gitlab.com/gitlab-org/api/client-go" "gitlab.com/gitlab-org/api/client-go/config/v1beta1" "gitlab.com/gitlab-org/api/client-go/gitlaboauth2" gitlab "gitlab.com/gitlab-org/api/client-go/v2" "gitlab.com/gitlab-org/api/client-go/v2/config/v1beta1" "gitlab.com/gitlab-org/api/client-go/v2/gitlaboauth2" "golang.org/x/oauth2" "golang.org/x/time/rate" "google.golang.org/protobuf/types/known/structpb" Loading config/config_test.go +2 −2 Original line number Diff line number Diff line Loading @@ -7,8 +7,8 @@ import ( "github.com/MakeNowJust/heredoc/v2" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" gitlab "gitlab.com/gitlab-org/api/client-go" "gitlab.com/gitlab-org/api/client-go/config/v1beta1" gitlab "gitlab.com/gitlab-org/api/client-go/v2" "gitlab.com/gitlab-org/api/client-go/v2/config/v1beta1" ) func TestConfig_EmptyConfig(t *testing.T) { Loading config/examples/basic_usage.go +2 −2 Original line number Diff line number Diff line Loading @@ -5,8 +5,8 @@ import ( "log" "github.com/MakeNowJust/heredoc/v2" "gitlab.com/gitlab-org/api/client-go" "gitlab.com/gitlab-org/api/client-go/config" "gitlab.com/gitlab-org/api/client-go/v2" "gitlab.com/gitlab-org/api/client-go/v2/config" ) func main() { Loading config/v1beta1/config.pb.go +1 −1 Original line number Diff line number Diff line Loading @@ -1735,7 +1735,7 @@ const file_config_v1beta1_config_proto_rawDesc = "" + "\xbaH\a\xc8\x01\x01r\x02\x10\x01R\x04user:\xbb\x01\n" + "\funique_names\x12\x1b.buf.validate.RepeatedRules\x18\xaa\xe8\x92& \x01(\bBx\xc2Hu\n" + "s\n" + "\funique_names\x12\x18all names must be unique\x1aIthis.map(i, i.name).all(name, this.filter(j, j.name == name).size() == 1)R\vuniqueNamesB4Z2gitlab.com/gitlab-org/api/client-go/config/v1beta1b\beditionsp\xe8\a" "\funique_names\x12\x18all names must be unique\x1aIthis.map(i, i.name).all(name, this.filter(j, j.name == name).size() == 1)R\vuniqueNamesB7Z5gitlab.com/gitlab-org/api/client-go/v2/config/v1beta1b\beditionsp\xe8\a" var ( file_config_v1beta1_config_proto_rawDescOnce sync.Once Loading Loading
README.md +9 −9 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ in a major release version to follow SemVar. For the release 2.0 migration guide ## Usage ```go import "gitlab.com/gitlab-org/api/client-go" import "gitlab.com/gitlab-org/api/client-go/v2" ``` Construct a new GitLab client, then use the various services on the client to Loading Loading @@ -64,7 +64,7 @@ package main import ( "log" "gitlab.com/gitlab-org/api/client-go" "gitlab.com/gitlab-org/api/client-go/v2" ) func main() { Loading Loading @@ -102,7 +102,7 @@ func main() { #### Use OAuth2 helper package The following example demonstrates how to use the `gitlab.com/gitlab-org/api/client-go/oauth2` package: The following example demonstrates how to use the `gitlab.com/gitlab-org/api/client-go/v2/oauth2` package: ```go package main Loading @@ -112,8 +112,8 @@ import ( "fmt" "os/exec" gitlab "gitlab.com/gitlab-org/api/client-go" "gitlab.com/gitlab-org/api/client-go/gitlaboauth2" gitlab "gitlab.com/gitlab-org/api/client-go/v2" "gitlab.com/gitlab-org/api/client-go/v2/gitlaboauth2" ) func main() { Loading Loading @@ -192,8 +192,8 @@ import ( "fmt" "log" "gitlab.com/gitlab-org/api/client-go" "gitlab.com/gitlab-org/api/client-go/config" "gitlab.com/gitlab-org/api/client-go/v2" "gitlab.com/gitlab-org/api/client-go/v2/config" ) func main() { Loading Loading @@ -240,12 +240,12 @@ For complete usage of go-gitlab, see the full [package docs](https://pkg.go.dev/ To install the library, use the following command: ```go go get gitlab.com/gitlab-org/api/client-go go get gitlab.com/gitlab-org/api/client-go/v2 ``` ## Testing The `client-go` project comes with a `testing` package at `gitlab.com/gitlab-org/api/client-go/testing` The `client-go` project comes with a `testing` package at `gitlab.com/gitlab-org/api/client-go/v2/testing` which contains a `TestClient` with [gomock](https://github.com/uber-go/mock) mocks for the individual services. You can use them like this: Loading
config/config.go +3 −3 Original line number Diff line number Diff line Loading @@ -27,9 +27,9 @@ import ( "buf.build/go/protovalidate" "buf.build/go/protoyaml" "github.com/zalando/go-keyring" gitlab "gitlab.com/gitlab-org/api/client-go" "gitlab.com/gitlab-org/api/client-go/config/v1beta1" "gitlab.com/gitlab-org/api/client-go/gitlaboauth2" gitlab "gitlab.com/gitlab-org/api/client-go/v2" "gitlab.com/gitlab-org/api/client-go/v2/config/v1beta1" "gitlab.com/gitlab-org/api/client-go/v2/gitlaboauth2" "golang.org/x/oauth2" "golang.org/x/time/rate" "google.golang.org/protobuf/types/known/structpb" Loading
config/config_test.go +2 −2 Original line number Diff line number Diff line Loading @@ -7,8 +7,8 @@ import ( "github.com/MakeNowJust/heredoc/v2" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" gitlab "gitlab.com/gitlab-org/api/client-go" "gitlab.com/gitlab-org/api/client-go/config/v1beta1" gitlab "gitlab.com/gitlab-org/api/client-go/v2" "gitlab.com/gitlab-org/api/client-go/v2/config/v1beta1" ) func TestConfig_EmptyConfig(t *testing.T) { Loading
config/examples/basic_usage.go +2 −2 Original line number Diff line number Diff line Loading @@ -5,8 +5,8 @@ import ( "log" "github.com/MakeNowJust/heredoc/v2" "gitlab.com/gitlab-org/api/client-go" "gitlab.com/gitlab-org/api/client-go/config" "gitlab.com/gitlab-org/api/client-go/v2" "gitlab.com/gitlab-org/api/client-go/v2/config" ) func main() { Loading
config/v1beta1/config.pb.go +1 −1 Original line number Diff line number Diff line Loading @@ -1735,7 +1735,7 @@ const file_config_v1beta1_config_proto_rawDesc = "" + "\xbaH\a\xc8\x01\x01r\x02\x10\x01R\x04user:\xbb\x01\n" + "\funique_names\x12\x1b.buf.validate.RepeatedRules\x18\xaa\xe8\x92& \x01(\bBx\xc2Hu\n" + "s\n" + "\funique_names\x12\x18all names must be unique\x1aIthis.map(i, i.name).all(name, this.filter(j, j.name == name).size() == 1)R\vuniqueNamesB4Z2gitlab.com/gitlab-org/api/client-go/config/v1beta1b\beditionsp\xe8\a" "\funique_names\x12\x18all names must be unique\x1aIthis.map(i, i.name).all(name, this.filter(j, j.name == name).size() == 1)R\vuniqueNamesB7Z5gitlab.com/gitlab-org/api/client-go/v2/config/v1beta1b\beditionsp\xe8\a" var ( file_config_v1beta1_config_proto_rawDescOnce sync.Once Loading