Skip to content

Commit

Permalink
Sanitize '.' character in the package names
Browse files Browse the repository at this point in the history
Fixes #9.
  • Loading branch information
isimluk committed Nov 27, 2021
1 parent 441e85e commit 95de50e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/xsd/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ func (sch *Schema) GoPackageName() string {
if xmlnsPrefix == "" {
xmlnsPrefix = strings.TrimSuffix(filepath.Base(sch.filePath), ".xsd")
}
return strings.ReplaceAll(xmlnsPrefix, "-", "_")
return strings.ReplaceAll(strings.ReplaceAll(xmlnsPrefix, "-", "_"), ".", "_")
}

func (sch *Schema) GoImportsNeeded() []string {
Expand Down

0 comments on commit 95de50e

Please # to comment.