MCPcopy Index your code
hub / github.com/rilldata/rill / normalizePath

Function normalizePath

runtime/parser/parser.go:1130–1135  ·  view source on GitHub ↗

normalizePath normalizes a user-provided path to the format returned from ListGlob. TODO: Change this once ListGlob returns paths without leading slash.

(path string)

Source from the content-addressed store, hash-verified

1128// normalizePath normalizes a user-provided path to the format returned from ListGlob.
1129// TODO: Change this once ListGlob returns paths without leading slash.
1130func 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

Callers 2

reparseExceptRillYAMLMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected