code: func matchWithSeparator(pattern, name string, separator rune) (bool, error) {
  	patternComponents := splitPathOnSeparator(pattern, separator)
  	nameComponents := splitPathOnSeparator(name, separator)
  	return doMatching(patternComponents, nameComponents)
  }
docs: // Match returns true if name matches the shell file name pattern.
  // The pattern syntax is:
  //
  //  pattern:
  //    { term }
  //  term:
  //    '*'         matches any sequence of non-path-separators
  //              '**'        matches any sequence of characters, including
  //                          path separators.
  //    '?'         matches any single non-path-separator character
  //    '[' [ '^' ] { character-range } ']'
  //          character class (must be non-empty)
  //    '{' { term } [ ',' { term } ... ] '}'
  //    c           matches character c (c != '*', '?', '\\', '[')
  //    '\\' c      matches character c
  //
  //  character-range:
  //    c           matches character c (c != '\\', '-', ']')
  //    '\\' c      matches character c, unless separator is '\\'
  //    lo '-' hi   matches character c for lo <= c <= hi
  //
  // Match requires pattern to match all of name, not just a substring.
  // The only possible returned error is ErrBadPattern, when pattern
  // is malformed.
  //