normalizePath normalizes a user-provided path to the format returned from ListGlob. TODO: Change this once ListGlob returns paths without leading slash.
(path string)
| 1128 | // normalizePath normalizes a user-provided path to the format returned from ListGlob. |
| 1129 | // TODO: Change this once ListGlob returns paths without leading slash. |
| 1130 | func normalizePath(path string) string { |
| 1131 | if path != "" && path[0] != '/' { |
| 1132 | return "/" + path |
| 1133 | } |
| 1134 | return path |
| 1135 | } |
| 1136 | |
| 1137 | // pathStem returns a slice of the path without the final file extension. |
| 1138 | // If the path does not contain a file extension, the entire path is returned |
no outgoing calls
no test coverage detected