Convert - to _ for protobuf package names

Convert - to _ for protobuf package names to allow protobuf code generation
support for go packages that have - in their names.
This commit is contained in:
Andy Goldstein
2016-10-24 10:01:39 -04:00
parent 1c677ed91e
commit 72cec547cd
4 changed files with 53 additions and 4 deletions

View File

@@ -138,9 +138,6 @@ func Run(g *Generator) {
d = d[1:]
outputPackage = false
}
if strings.Contains(d, "-") {
log.Fatalf("Package names must be valid protobuf package identifiers, which allow only [a-z0-9_]: %s", d)
}
name := protoSafePackage(d)
parts := strings.SplitN(d, "=", 2)
if len(parts) > 1 {