Fix for path = "."

This commit is contained in:
hjusforgues
2016-10-18 18:29:13 +07:00
parent f8d1fd78de
commit 28c354da27
+1 -1
View File
@@ -40,7 +40,7 @@ func generate(fname string) (err error) {
var outName string
if fInfo.IsDir() {
outName = filepath.Join(fname, filepath.Base(filepath.Clean(fname))+"_easyjson.go")
outName = filepath.Join(fname, p.PkgName+"_easyjson.go")
} else {
if s := strings.TrimSuffix(fname, ".go"); s == fname {
return errors.New("Filename must end in '.go'")