Skip to content

Commit

Permalink
Change go module for v2 (#931)
Browse files Browse the repository at this point in the history
    Update go.mod of all the modules
    Update imports across files
    Ran go mod tidy which generated the go.sum files.
    Documentation update, needed to change the generate script as well for v2.
    Documentation changes in README.md



Co-authored-by: Emanuele Sabellico <[email protected]>
  • Loading branch information
milindl and emasab authored Jan 23, 2023
1 parent ac2f9dc commit cde2827
Show file tree
Hide file tree
Showing 77 changed files with 874 additions and 457 deletions.
9 changes: 6 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Confluent's Golang client for Apache Kafka

## v2.0.0
## v2.0.2

This is a feature release:

Expand Down Expand Up @@ -43,11 +43,14 @@ This is a feature release:
(@HansK-p, @ju-popov, #878).


confluent-kafka-go is based on librdkafka v2.0.0, see the
[librdkafka release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.0.0)
confluent-kafka-go is based on librdkafka v2.0.2, see the
[librdkafka release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.0.2)
for a complete list of changes, enhancements, fixes and upgrade considerations.


**Note**: There were no confluent-kafka-go v2.0.0 or v2.0.1 releases.


## v1.9.2

This is a maintenance release:
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import (
"fmt"
"time"

"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
)

func main() {
Expand Down Expand Up @@ -85,7 +85,7 @@ Producer
```golang
import (
"fmt"
"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
)

func main() {
Expand Down Expand Up @@ -133,7 +133,7 @@ for use with [Confluent Cloud](https://www.confluent.io/confluent-cloud/).
Getting Started
===============

Supports Go 1.14+ and librdkafka 2.0.0+.
Supports Go 1.14+ and librdkafka 2.0.2+.

Using Go Modules
----------------
Expand All @@ -144,7 +144,7 @@ confluent-kafka-go.
Import the `kafka` package from GitHub in your code:

```golang
import "github.com/confluentinc/confluent-kafka-go/kafka"
import "github.com/confluentinc/confluent-kafka-go/v2/kafka"
```

Build your project:
Expand All @@ -167,12 +167,12 @@ Install the client

Manual install:
```bash
go get -u github.com/confluentinc/confluent-kafka-go/kafka
go get -u github.com/confluentinc/confluent-kafka-go/v2/kafka
```

Golang import:
```golang
import "github.com/confluentinc/confluent-kafka-go/kafka"
import "github.com/confluentinc/confluent-kafka-go/v2/kafka"
```

librdkafka
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"strconv"
"time"

"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/admin_create_acls/admin_create_acls.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"os"
"time"

"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
)

// Parses a list of 7n arguments to a slice of n ACLBinding
Expand Down
2 changes: 1 addition & 1 deletion examples/admin_create_topic/admin_create_topic.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"strconv"
"time"

"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/admin_delete_acls/admin_delete_acls.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"os"
"time"

"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
)

// Parses a list of 7n arguments to a slice of n ACLBindingFilter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"strconv"
"time"

"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/admin_delete_topics/admin_delete_topics.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"os"
"time"

"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/admin_describe_acls/admin_describe_acls.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"os"
"time"

"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
)

// Parses a list of 7n arguments to a slice of n ACLBindingFilter
Expand Down
2 changes: 1 addition & 1 deletion examples/admin_describe_config/admin_describe_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"os"
"time"

"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
)

func main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"os"
"time"

"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
)

func main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"strconv"
"time"

"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
)

func main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"os"
"time"

"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
)

func main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ import (
"os/signal"
"syscall"

"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/confluentinc/confluent-kafka-go/schemaregistry"
"github.com/confluentinc/confluent-kafka-go/schemaregistry/serde"
"github.com/confluentinc/confluent-kafka-go/schemaregistry/serde/avro"
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
"github.com/confluentinc/confluent-kafka-go/v2/schemaregistry"
"github.com/confluentinc/confluent-kafka-go/v2/schemaregistry/serde"
"github.com/confluentinc/confluent-kafka-go/v2/schemaregistry/serde/avro"
)

func main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import (
"fmt"
"os"

"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/confluentinc/confluent-kafka-go/schemaregistry"
"github.com/confluentinc/confluent-kafka-go/schemaregistry/serde"
"github.com/confluentinc/confluent-kafka-go/schemaregistry/serde/avro"
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
"github.com/confluentinc/confluent-kafka-go/v2/schemaregistry"
"github.com/confluentinc/confluent-kafka-go/v2/schemaregistry/serde"
"github.com/confluentinc/confluent-kafka-go/v2/schemaregistry/serde/avro"
)

func main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ import (
"os/signal"
"syscall"

"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/confluentinc/confluent-kafka-go/schemaregistry"
"github.com/confluentinc/confluent-kafka-go/schemaregistry/serde"
"github.com/confluentinc/confluent-kafka-go/schemaregistry/serde/avro"
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
"github.com/confluentinc/confluent-kafka-go/v2/schemaregistry"
"github.com/confluentinc/confluent-kafka-go/v2/schemaregistry/serde"
"github.com/confluentinc/confluent-kafka-go/v2/schemaregistry/serde/avro"
)

func main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import (
"fmt"
"os"

"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/confluentinc/confluent-kafka-go/schemaregistry"
"github.com/confluentinc/confluent-kafka-go/schemaregistry/serde"
"github.com/confluentinc/confluent-kafka-go/schemaregistry/serde/avro"
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
"github.com/confluentinc/confluent-kafka-go/v2/schemaregistry"
"github.com/confluentinc/confluent-kafka-go/v2/schemaregistry/serde"
"github.com/confluentinc/confluent-kafka-go/v2/schemaregistry/serde/avro"
)

func main() {
Expand Down
8 changes: 4 additions & 4 deletions examples/confluent_cloud_example/confluent_cloud_example.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ import (
"os"
"time"

"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/confluentinc/confluent-kafka-go/schemaregistry"
"github.com/confluentinc/confluent-kafka-go/schemaregistry/serde"
"github.com/confluentinc/confluent-kafka-go/schemaregistry/serde/avro"
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
"github.com/confluentinc/confluent-kafka-go/v2/schemaregistry"
"github.com/confluentinc/confluent-kafka-go/v2/schemaregistry/serde"
"github.com/confluentinc/confluent-kafka-go/v2/schemaregistry/serde/avro"
)

// In order to set the constants below, you are going to need
Expand Down
2 changes: 1 addition & 1 deletion examples/consumer_example/consumer_example.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"os/signal"
"syscall"

"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
)

func main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"os"
"strconv"

"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
)

func main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"os/signal"
"syscall"

"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/docker_aws_lambda_example/producer_example.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"os"

"github.com/aws/aws-lambda-go/lambda"
"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
)

var p *kafka.Producer
Expand Down
2 changes: 1 addition & 1 deletion examples/go-kafkacat/go-kafkacat.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"syscall"

"github.com/alecthomas/kingpin"
"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
)

var (
Expand Down
8 changes: 4 additions & 4 deletions examples/go.mod
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
module github.com/confluentinc/confluent-kafka-go/examples
module github.com/confluentinc/confluent-kafka-go/examples/v2

go 1.13
go 1.14

replace github.com/confluentinc/confluent-kafka-go => ../
replace github.com/confluentinc/confluent-kafka-go/v2 => ../

require (
github.com/actgardner/gogen-avro/v10 v10.2.1
github.com/alecthomas/kingpin v2.2.6+incompatible
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect
github.com/confluentinc/confluent-kafka-go v1.9.2
github.com/confluentinc/confluent-kafka-go/v2 v2.0.2-00010101000000-000000000000
github.com/gdamore/tcell v1.4.0
google.golang.org/protobuf v1.28.0
)
1 change: 0 additions & 1 deletion examples/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
"os"
"time"

"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
)

var run = true
Expand Down
8 changes: 4 additions & 4 deletions examples/json_consumer_example/json_consumer_example.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ import (
"os/signal"
"syscall"

"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/confluentinc/confluent-kafka-go/schemaregistry"
"github.com/confluentinc/confluent-kafka-go/schemaregistry/serde"
"github.com/confluentinc/confluent-kafka-go/schemaregistry/serde/jsonschema"
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
"github.com/confluentinc/confluent-kafka-go/v2/schemaregistry"
"github.com/confluentinc/confluent-kafka-go/v2/schemaregistry/serde"
"github.com/confluentinc/confluent-kafka-go/v2/schemaregistry/serde/jsonschema"
)

func main() {
Expand Down
8 changes: 4 additions & 4 deletions examples/json_producer_example/json_producer_example.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import (
"fmt"
"os"

"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/confluentinc/confluent-kafka-go/schemaregistry"
"github.com/confluentinc/confluent-kafka-go/schemaregistry/serde"
"github.com/confluentinc/confluent-kafka-go/schemaregistry/serde/jsonschema"
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
"github.com/confluentinc/confluent-kafka-go/v2/schemaregistry"
"github.com/confluentinc/confluent-kafka-go/v2/schemaregistry/serde"
"github.com/confluentinc/confluent-kafka-go/v2/schemaregistry/serde/jsonschema"
)

func main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"os/signal"
"syscall"

"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
)

func main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"fmt"
"os"

"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/library-version/library-version.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ package main
import (
"fmt"

"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/mockcluster_example/mockcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"fmt"
"os"

"github.com/confluentinc/confluent-kafka-go/kafka"
"github.com/confluentinc/confluent-kafka-go/v2/kafka"
)

func main() {
Expand Down
Loading

0 comments on commit cde2827

Please sign in to comment.