Sunday, September 8, 2024
HomeGolangAssist with paho go shopper - Getting Assist

Assist with paho go shopper – Getting Assist


Hello everybody,
excuse for my little English.

I’m a newbie in go programming.

I want to set up assist for the MQTT protocol (as within the paho documentation) but when I attempt to give the command:

go get GitHub – eclipse/paho.mqtt.golang

it tells me that the command -go get- is now not supported. I attempted with command set up and the @newest suffix however I can’t get it to work. I additionally tried to incorporate the road within the go program:

MQTT “GitHub – eclipse/paho.mqtt.golang

however with out success.

Please can somebody give me a tip to get began?

Hello and thanks,
Lorenzo

it tells me that the command -go get- is now not supported

Was the message “‘go get’ is now not supported outdoors a module.” ? If it was then the final three phrases, “outdoors a module”, are your clue.

There are lots of articles on the market the place you possibly can examine Go modules. However the gist of what you’ll have to do might be alongside these traces.

cd <my-project>

# initialize a module
go mod init <my-project-package-name>
# for instance  : go mod init github.com/myusername/myproject
# and even simply : go mod init myproject

# get your dependency, it will likely be added to `go.mod`
go get github.com/eclipse/paho.mqtt.golang

You’ll then be capable to import github.com/eclipse/paho.mqtt.golang .

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments