MCPcopy Create free account
hub / github.com/rilldata/rill / pathStem

Function pathStem

runtime/parser/parser.go:1139–1145  ·  view source on GitHub ↗

pathStem returns a slice of the path without the final file extension. If the path does not contain a file extension, the entire path is returned

(path string)

Source from the content-addressed store, hash-verified

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
1139func pathStem(path string) string {
1140 i := strings.LastIndexByte(path, '.')
1141 if i == -1 {
1142 return path
1143 }
1144 return path[:i]
1145}
1146
1147func ambiguousRef(n ResourceName) bool {
1148 return n.Kind == ResourceKindUnspecified || n.Kind == ResourceKindConnector

Callers 3

reparseExceptRillYAMLMethod · 0.85
parsePathsMethod · 0.85
parseStemMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected