MCPcopy Index your code
hub / github.com/devspace-sh/devspace / GetPartialImportName

Function GetPartialImportName

docs/hack/util/partials.go:12–17  ·  view source on GitHub ↗
(partialImport string)

Source from the content-addressed store, hash-verified

10var partialNameRegex = regexp.MustCompile(`(\..*$)|[^a-zA-Z]`)
11
12func GetPartialImportName(partialImport string) string {
13 basename := filepath.Base(partialImport)
14 basename = partialNameRegex.ReplaceAllString(basename, "")
15
16 return fmt.Sprintf("Partial%s", strings.Title(basename))
17}
18
19func GetPartialImport(partialFile, importingFile string) string {
20 partialImportPath, err := filepath.Rel(filepath.Dir(importingFile), partialFile)

Callers 4

mainFunction · 0.92
getFlagReferenceFunction · 0.92
createSectionsFunction · 0.85
GetPartialImportFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected