code: func (e *Entry) addPatterns(patterns []string) *Entry {
  	var currentNode *Entry = e
  
  	for len(patterns) > 0 {
  		var entry *Entry
  		pat, size := PeekNextPattern(patterns)
  
  		// suffix entry
  		if size == 2 {
  			matcher, name := parseMatcher(patterns[0])
  			suffixMatcher := &SuffixMatcher{patterns[1], matcher}
  			entry = newSuffixMatchEntry(pat, name, suffixMatcher)
  		} else if isMatchPattern(pat) {
  			entry = newMatchEntry(pat)
  		} else {
  			entry = newStaticEntry(pat)
  		}
  
  		currentNode.AddEntry(entry)
  		currentNode = entry
  		patterns = patterns[size:]
  	}
  
  	return currentNode
  }
docs: // addPatterns adds entry children with the pattern strings.