go-pathmatch/pattern_init.go

17 lines
326 B
Go
Raw Permalink Normal View History

2019-06-21 20:37:53 +00:00
package pathmatch
func (receiver *Pattern) init(fieldTagName string) {
if nil == receiver {
return
}
bits := []string{}
names := []string{}
namesSet := map[string]struct{}{}
receiver.bits = bits
receiver.names = names
receiver.namesSet = namesSet
receiver.fieldTagName = fieldTagName
}