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

Function GetPartialImport

docs/hack/util/partials.go:19–30  ·  view source on GitHub ↗
(partialFile, importingFile string)

Source from the content-addressed store, hash-verified

17}
18
19func GetPartialImport(partialFile, importingFile string) string {
20 partialImportPath, err := filepath.Rel(filepath.Dir(importingFile), partialFile)
21 if err != nil {
22 panic(err)
23 }
24
25 if partialImportPath[0:1] != "." {
26 partialImportPath = "./" + partialImportPath
27 }
28
29 return fmt.Sprintf(TemplatePartialImport, GetPartialImportName(partialFile), partialImportPath)
30}

Callers 3

mainFunction · 0.92
createSectionsFunction · 0.85
ProcessGroupsFunction · 0.85

Calls 1

GetPartialImportNameFunction · 0.85

Tested by

no test coverage detected