code: func match(topicName, topicFilter string) bool {
  	// Tokenize the Topic Name.
  	nameTokens := strings.Split(topicName, "/")
  	nameTokensLen := len(nameTokens)
  
  	// Tolenize the Topic Filter.
  	filterTokens := strings.Split(topicFilter, "/")
  
  	for i, t := range filterTokens {
  		switch t {
  		case "#":
  			return i != 0 || !strings.HasPrefix(nameTokens[0], "$")
  		case "+":
  			if i == 0 && strings.HasPrefix(nameTokens[0], "$") {
  				return false
  			}
  
  			if nameTokensLen <= i {
  				return false
  			}
  		default:
  			if nameTokensLen <= i || t != nameTokens[i] {
  				return false
  			}
  		}
  	}
  
  	return len(filterTokens) == nameTokensLen
  }
docs: // match checks if the Topic Name matches the Topic Filter.