mirror of
https://github.com/lucacasonato/mqtt.git
synced 2025-09-27 03:05:59 +08:00
Updated README
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
[](http://godoc.org/github.com/lucacasonato/mqtt)
|
||||
[](https://github.com/lucacasonato/mqtt/actions?workflow=ci)
|
||||
[](https://codecov.io/gh/lucacasonato/mqtt)
|
||||
[](https://codecov.io/gh/lucacasonato/mqtt)
|
||||
[](https://goreportcard.com/report/github.com/lucacasonato/mqtt)
|
||||
|
||||
An mqtt client for Go that improves usability over the [paho.mqtt.golang](https://github.com/eclipse/paho.mqtt.golang) library it wraps. Made for 🧑.
|
||||
@@ -79,7 +79,7 @@ if err != nil {
|
||||
#### json
|
||||
|
||||
```go
|
||||
err := client.Publish(context.WithTimeout(1 * time.Second), "api/v0/main/client1", []string("hello", "world"), mqtt.AtLeastOnce)
|
||||
err := client.PublishJSON(context.WithTimeout(1 * time.Second), "api/v0/main/client1", []string("hello", "world"), mqtt.AtLeastOnce)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user