You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While trying to execute it the error message was triggered:
I realized that there is no go.mod in the project, and the import of "./ccloud" is breaking. (Honestly could be an ignorance on my side, I do not know how to use those relative imports)
Then I needed to first create a module with go mod init anything/r and go mod tidy
Troubleshooting
Change That I needed to do in the code to make it work
//Change That I needed to do in the code
import (
"anything/r/ccloud"
"encoding/json"
"fmt"
"gopkg.in/confluentinc/confluent-kafka-go.v1/kafka"
"os"
"os/signal"
"syscall"
"time"
)
Then after that, I was able to use the example successfully ./producer -f $HOME/.confluent/librdkafka.config -t test1
Environment
GitHub branch: 7.2.1-post
Operating System: Ubuntu 20.04.3 LTS
Version of Docker: Did not use
Version of Docker Compose: Did not use
The text was updated successfully, but these errors were encountered:
Description
I tried to go through the step by step mentioned in the documentation:
https://docs.confluent.io/platform/current/tutorials/examples/clients/docs/go.html?ajs_aid=7077fcce-0d54-4277-a0c0-50c875f49cd2&ajs_uid=718849
While trying to execute it the error message was triggered:
I realized that there is no
go.mod
in the project, and the import of "./ccloud" is breaking. (Honestly could be an ignorance on my side, I do not know how to use those relative imports)Then I needed to first create a module with
go mod init anything/r
andgo mod tidy
Troubleshooting
Change That I needed to do in the code to make it work
Then after that, I was able to use the example successfully
./producer -f $HOME/.confluent/librdkafka.config -t test1
Environment
The text was updated successfully, but these errors were encountered: