Skip to content

buun1030/mqtt-projects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 

Repository files navigation

mqtt-projects

This project uses paho.mqtt.golang as MQTT client library, install:

go get github.com/eclipse/paho.mqtt.golang

If you're encountering a red import error in Go when trying to import a package from GitHub.

Solution 1: If your project did not get any library yet, you need to create a go.mod first.

go mod init mymodule
go mod tidy

Solution 2: You may set GO111MODULE env var to auto

go env -w GO111MODULE=auto

Solution 3: Clear your Go module cache: If you're using Go modules, try clearing your module cache by running the following command:

go clean -modcache

This will remove all cached modules and force Go to re-download them.

Solution 4: Check your workspace settings: If you are using Visual Studio Code, make sure that your workspace settings are configured to use the correct GOPATH. GOPATH check by

go env

Configuring GOPATH by opening your workspace settings (Ctrl+Shift+P, then search for "Preferences: Open Workspace Settings"), and then setting the "go.gopath" property to the correct directory.

About

Pub/Sub IoT data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages