terraform-provider-google/vendor/github.com/posener/complete/match/prefix.go
Dana Hoffman 06356c2fc7
Revendor hashicorp/terraform (#697)
* revendor hashicorp/terraform @0.10.1

* revendor hashicorp/go-plugin
2017-11-07 11:29:51 -08:00

10 lines
243 B
Go

package match
import "strings"
// Prefix is a simple Matcher, if the word is it's prefix, there is a match
// Match returns true if a has the prefix as prefix
func Prefix(long, prefix string) bool {
return strings.HasPrefix(long, prefix)
}