(partialImport string)
| 10 | var partialNameRegex = regexp.MustCompile(`(\..*$)|[^a-zA-Z]`) |
| 11 | |
| 12 | func 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 | |
| 19 | func GetPartialImport(partialFile, importingFile string) string { |
| 20 | partialImportPath, err := filepath.Rel(filepath.Dir(importingFile), partialFile) |
no outgoing calls
no test coverage detected