rearrange the code
This commit is contained in:
parent
0aa3457e7d
commit
e6a3329628
40
main.go
40
main.go
|
@ -117,26 +117,6 @@ func main() {
|
|||
os.Exit(-1)
|
||||
}
|
||||
|
||||
// this should be garbage soon
|
||||
sortmap = make(map[string]string)
|
||||
sortmap["package"] = packageName
|
||||
sortmap["protofile"] = argv.Proto
|
||||
sortmap["protobase"] = protobase
|
||||
if argv.LoBase == "" {
|
||||
// if not set, assumed to be protobase
|
||||
sortmap["base"] = protobase
|
||||
} else {
|
||||
sortmap["base"] = argv.LoBase
|
||||
}
|
||||
sortmap["lock"] = sortmap["base"] + "sMu" // is nonglobal and plural
|
||||
if argv.UpBase == "" {
|
||||
sortmap["Base"] = cases.Title(language.English, cases.NoLower).String(protobase)
|
||||
sortmap["Bases"] = sortmap["Base"] + "s"
|
||||
} else {
|
||||
sortmap["Base"] = argv.UpBase
|
||||
sortmap["Bases"] = sortmap["Base"] + "s"
|
||||
}
|
||||
|
||||
if argv.DryRun {
|
||||
os.Exit(0)
|
||||
}
|
||||
|
@ -166,6 +146,26 @@ func main() {
|
|||
|
||||
pb.marshal(f)
|
||||
|
||||
// this should be garbage soon
|
||||
sortmap = make(map[string]string)
|
||||
sortmap["package"] = packageName
|
||||
sortmap["protofile"] = argv.Proto
|
||||
sortmap["protobase"] = protobase
|
||||
if argv.LoBase == "" {
|
||||
// if not set, assumed to be protobase
|
||||
sortmap["base"] = protobase
|
||||
} else {
|
||||
sortmap["base"] = argv.LoBase
|
||||
}
|
||||
sortmap["lock"] = sortmap["base"] + "sMu" // is nonglobal and plural
|
||||
if argv.UpBase == "" {
|
||||
sortmap["Base"] = cases.Title(language.English, cases.NoLower).String(protobase)
|
||||
sortmap["Bases"] = sortmap["Base"] + "s"
|
||||
} else {
|
||||
sortmap["Base"] = argv.UpBase
|
||||
sortmap["Bases"] = sortmap["Base"] + "s"
|
||||
}
|
||||
|
||||
// pb.makeSortfile(f)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue