Next returns a new path by append part to the current path
(part string)
| 40 | |
| 41 | // Next returns a new path by append part to the current path |
| 42 | func (p Path) Next(part string) Path { |
| 43 | if p == "" { |
| 44 | return Path(part) |
| 45 | } |
| 46 | part = strings.ReplaceAll(part, pathSeparator, "👻") |
| 47 | return Path(string(p) + pathSeparator + part) |
| 48 | } |
| 49 | |
| 50 | func (p Path) Parts() []string { |
| 51 | return strings.Split(string(p), pathSeparator) |
no test coverage detected