transform all but the last path segment
(s string, t transform)
| 112 | |
| 113 | // transform all but the last path segment |
| 114 | func transformDir(s string, t transform) (string, error) { |
| 115 | dirPath, err := transformPath(path.Dir(s), t, false) |
| 116 | if err != nil { |
| 117 | return "", err |
| 118 | } |
| 119 | return path.Join(dirPath, path.Base(s)), nil |
| 120 | } |
| 121 | |
| 122 | // transformPathSegment transforms one path segment (or really any string) according to the chosen TransformAlgo. |
| 123 | // It assumes path separators have already been trimmed. |
no test coverage detected
searching dependent graphs…