Skip to content

Commit

Permalink
Merge pull request #307 from temoto/patch-1
Browse files Browse the repository at this point in the history
typo
  • Loading branch information
Al S-M committed Aug 29, 2019
2 parents a436547 + e86f94f commit 0dfc322
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion client.go
Expand Up @@ -59,7 +59,7 @@ type Client interface {
// IsConnected returns a bool signifying whether
// the client is connected or not.
IsConnected() bool
// IsConnectionOpen return a bool signifying wether the client has an active
// IsConnectionOpen return a bool signifying whether the client has an active
// connection to mqtt broker, i.e not in disconnected or reconnect mode
IsConnectionOpen() bool
// Connect will create a connection to the message broker, by default
Expand Down
2 changes: 1 addition & 1 deletion filestore.go
Expand Up @@ -124,7 +124,7 @@ func (store *FileStore) Get(key string) packets.ControlPacket {
}

// All will provide a list of all of the keys associated with messages
// currenly residing in the FileStore.
// currently residing in the FileStore.
func (store *FileStore) All() []string {
store.RLock()
defer store.RUnlock()
Expand Down
10 changes: 5 additions & 5 deletions options.go
Expand Up @@ -156,23 +156,23 @@ func (o *ClientOptions) SetResumeSubs(resume bool) *ClientOptions {

// SetClientID will set the client id to be used by this client when
// connecting to the MQTT broker. According to the MQTT v3.1 specification,
// a client id mus be no longer than 23 characters.
// a client id must be no longer than 23 characters.
func (o *ClientOptions) SetClientID(id string) *ClientOptions {
o.ClientID = id
return o
}

// SetUsername will set the username to be used by this client when connecting
// to the MQTT broker. Note: without the use of SSL/TLS, this information will
// be sent in plaintext accross the wire.
// be sent in plaintext across the wire.
func (o *ClientOptions) SetUsername(u string) *ClientOptions {
o.Username = u
return o
}

// SetPassword will set the password to be used by this client when connecting
// to the MQTT broker. Note: without the use of SSL/TLS, this information will
// be sent in plaintext accross the wire.
// be sent in plaintext across the wire.
func (o *ClientOptions) SetPassword(p string) *ClientOptions {
o.Password = p
return o
Expand All @@ -181,7 +181,7 @@ func (o *ClientOptions) SetPassword(p string) *ClientOptions {
// SetCredentialsProvider will set a method to be called by this client when
// connecting to the MQTT broker that provide the current username and password.
// Note: without the use of SSL/TLS, this information will be sent
// in plaintext accross the wire.
// in plaintext across the wire.
func (o *ClientOptions) SetCredentialsProvider(p CredentialsProvider) *ClientOptions {
o.CredentialsProvider = p
return o
Expand Down Expand Up @@ -308,7 +308,7 @@ func (o *ClientOptions) SetWriteTimeout(t time.Duration) *ClientOptions {
}

// SetConnectTimeout limits how long the client will wait when trying to open a connection
// to an MQTT server before timeing out and erroring the attempt. A duration of 0 never times out.
// to an MQTT server before timing out and erroring the attempt. A duration of 0 never times out.
// Default 30 seconds. Currently only operational on TCP/TLS connections.
func (o *ClientOptions) SetConnectTimeout(t time.Duration) *ClientOptions {
o.ConnectTimeout = t
Expand Down
2 changes: 1 addition & 1 deletion token.go
Expand Up @@ -125,7 +125,7 @@ type ConnectToken struct {
sessionPresent bool
}

// ReturnCode returns the acknowlegement code in the connack sent
// ReturnCode returns the acknowledgement code in the connack sent
// in response to a Connect()
func (c *ConnectToken) ReturnCode() byte {
c.m.RLock()
Expand Down
2 changes: 1 addition & 1 deletion topic.go
Expand Up @@ -46,7 +46,7 @@ var ErrInvalidTopicMultilevel = errors.New("Invalid Topic; multi-level wildcard
// - A TopicName may not contain a wildcard.
// - A TopicFilter may only have a # (multi-level) wildcard as the last level.
// - A TopicFilter may contain any number of + (single-level) wildcards.
// - A TopicFilter with a # will match the absense of a level
// - A TopicFilter with a # will match the absence of a level
// Example: a subscription to "foo/#" will match messages published to "foo".

func validateSubscribeMap(subs map[string]byte) ([]string, []byte, error) {
Expand Down

0 comments on commit 0dfc322

Please sign in to comment.