(partialFile, importingFile string)
| 17 | } |
| 18 | |
| 19 | func 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 | } |
no test coverage detected