NormalizeAndTransformForPathType calls NormalizeAndValidate for relative paths, and NormalizeAndAbsolute for absolute paths.
(path string, pathType PathType)
| 123 | // NormalizeAndTransformForPathType calls NormalizeAndValidate for relative |
| 124 | // paths, and NormalizeAndAbsolute for absolute paths. |
| 125 | func NormalizeAndTransformForPathType(path string, pathType PathType) (string, error) { |
| 126 | switch pathType { |
| 127 | case Relative: |
| 128 | return NormalizeAndValidate(path) |
| 129 | case Absolute: |
| 130 | return NormalizeAndAbsolute(path) |
| 131 | default: |
| 132 | return "", fmt.Errorf("unknown PathType: %v", pathType) |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | // Unnormalize unnormalizes the given path. |
| 137 | // |
nothing calls this directly
no test coverage detected
searching dependent graphs…