mirror of
https://github.com/logos-messaging/logos-messaging-go.git
synced 2026-01-08 08:53:12 +00:00
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)
|
|
}
|
|
}
|