Skip to content

Commit

Permalink
a bug fix that causes test file names broken
Browse files Browse the repository at this point in the history
  • Loading branch information
enesarf committed Sep 28, 2022
1 parent d2c7dd9 commit ef7154a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions goarch/file/gotestfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package file
import (
"github.com/eneskzlcn/goarch/goarch/fileutil"
"path"
"strings"
)

type GoTestFile struct {
Expand All @@ -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 {
Expand Down

0 comments on commit ef7154a

Please sign in to comment.