diff --git a/goarch/file/gotestfile.go b/goarch/file/gotestfile.go index fff9f0a..d72e9ee 100644 --- a/goarch/file/gotestfile.go +++ b/goarch/file/gotestfile.go @@ -3,6 +3,7 @@ package file import ( "github.com/eneskzlcn/goarch/goarch/fileutil" "path" + "strings" ) type GoTestFile struct { @@ -28,6 +29,9 @@ func (g GoTestFile) nameToFilename(name string) string { if fileutil.IsGoTestFilename(name) { return name } + if strings.HasSuffix(name, "_test") { + return name + ".go" + } return name + "_test.go" } func (g GoTestFile) emptyFileContent(packageName string) string {