()
| 67 | } |
| 68 | |
| 69 | func (p *PathIterator) init() { |
| 70 | if !p.inited { |
| 71 | // p.path = strings.TrimSpace(p.path) |
| 72 | loc := regexpSepPrefix.FindStringIndex(p.path) |
| 73 | if len(loc) == 2 { |
| 74 | p.path = p.path[loc[1]:] |
| 75 | } |
| 76 | p.path = regexpDupSep.ReplaceAllString(p.path, pathSep) |
| 77 | p.inited = true |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | func (p *PathIterator) HasNext() bool { |
| 82 | p.init() |