Match mqtt formatted topic strings to strings, e.g. foo/+
should match foo/bar
.
package main
import (
"fmt"
mqtttopic "github.com/farshidtz/mqtt-match"
)
func main(){
fmt.Println(mqtttopic.Match("foo/+", "foo/bar"))
// true
}
This package is a translation of mqtt-match for Go.