Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
Signed-off-by: Dušan Borovčanin <[email protected]>
  • Loading branch information
dborovcanin committed Feb 24, 2020
1 parent 1f9866d commit 0cd1ae0
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions examples/simple/simple.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,28 +39,26 @@ func (e *Event) AuthPublish(username, clientID string, topic *string, payload *[
// AuthSubscribe is called on device publish,
// prior forwarding to the MQTT broker
func (e *Event) AuthSubscribe(username, clientID string, topics *[]string) error {

e.logger.Info(fmt.Sprintf("AuthSubscribe() - clientID: %s, topics: %s", clientID, strings.Join(*topics, ",")))
return nil
}

// Register - after client sucesfully connected
// Register - after client successfully connected
func (e *Event) Register(clientID string) {
e.logger.Info(fmt.Sprintf("Register() - clientID: %s", clientID))
}

// Publish - after client sucesfully published
// Publish - after client successfully published
func (e *Event) Publish(clientID, topic string, payload []byte) {
e.logger.Info(fmt.Sprintf("Publish() - clientID: %s, topic: %s, payload: %s", clientID, topic, string(payload)))
}

// Subscribe - after client sucesfully subscribed
// Subscribe - after client successfully subscribed
func (e *Event) Subscribe(clientID string, topics []string) {
e.logger.Info(fmt.Sprintf("Subscribe() - clientID: %s, topics: %s", clientID, strings.Join(topics, ",")))
}

// Unubscribe - after client unsubscribed
func (e *Event) Unubscribe(clientID string, topics []string) {

e.logger.Info(fmt.Sprintf("Unubscribe() - clientID: %s, topics: %s", clientID, strings.Join(topics, ",")))
// Unsubscribe - after client unsubscribed
func (e *Event) Unsubscribe(clientID string, topics []string) {
e.logger.Info(fmt.Sprintf("Unsubscribe() - clientID: %s, topics: %s", clientID, strings.Join(topics, ",")))
}

0 comments on commit 0cd1ae0

Please sign in to comment.