mirror of
https://github.com/napnap75/multiarch-docker-images.git
synced 2025-12-16 11:44:18 +01:00
Corrected the mishandling of strings
This commit is contained in:
@@ -65,7 +65,7 @@ func main() {
|
||||
fmt.Fprintf(os.Stderr, "Error while listening for docker events: %v\n", err)
|
||||
|
||||
case msg := <-msgs:
|
||||
mqttClient.Publish(*mqttTopic + "/events", 0, false, fmt.Sprintf("{ \"time\": %d, \"type\": \"%s\", \"name\": \"%s\", \"action\": \"%s\"}", msg.Time, msg.Type, msg.Actor.Attributes["name"], msg.Action))
|
||||
mqttClient.Publish(*mqttTopic + "/events", 0, false, fmt.Sprintf("{ \"time\": %d, \"type\": %q, \"name\": %q, \"action\": %q}", msg.Time, msg.Type, msg.Actor.Attributes["name"], msg.Action))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user