Skip to content

Commit

Permalink
Do not use xmlns prefix as the filename for generated files
Browse files Browse the repository at this point in the history
We already have directory name (=module name) equal to the xmlns prefix.

Having consistency of the filename (all being named models.go) will allow
projects with multiple modules to have somewhat consistent naming within the
directories.
  • Loading branch information
isimluk committed May 25, 2020
1 parent 579ad5c commit 8ee2914
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/template/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func GenerateTypes(schema *xsd.Schema, outputDir string) error {
if err != nil {
return err
}
f, err := os.Create(fmt.Sprintf("%s/%s.go", dir, packageName))
f, err := os.Create(fmt.Sprintf("%s/models.go", dir))
if err != nil {
return err
}
Expand Down

0 comments on commit 8ee2914

Please # to comment.