mirror of https://github.com/status-im/go-waku.git
16 lines
356 B
Go
16 lines
356 B
Go
package protocol
|
|
|
|
import "strings"
|
|
|
|
func FulltextMatch(expectedProtocol string) func(string) bool {
|
|
return func(receivedProtocol string) bool {
|
|
return receivedProtocol == expectedProtocol
|
|
}
|
|
}
|
|
|
|
func PrefixTextMatch(prefix string) func(string) bool {
|
|
return func(receivedProtocol string) bool {
|
|
return strings.HasPrefix(receivedProtocol, prefix)
|
|
}
|
|
}
|