summaryrefslogtreecommitdiff
path: root/sort.go
diff options
context:
space:
mode:
Diffstat (limited to 'sort.go')
-rw-r--r--sort.go14
1 files changed, 4 insertions, 10 deletions
diff --git a/sort.go b/sort.go
index a63b067..90e7f5a 100644
--- a/sort.go
+++ b/sort.go
@@ -19,14 +19,6 @@ func (pb *Files) makeNewSortfile(pf *File) error {
defer wFind.Close()
header(wSort, pf)
- header(wFind, pf)
-
- pf.syncLock(wSort)
-
- // if argv.Mutex {
- // // use the mutex lock from the modified protoc.pb.go file
- // pf.Bases.Lockname = "all.Lock"
- // }
pf.Base.iterTop(wSort)
pf.Base.iterNext(wSort)
@@ -45,7 +37,9 @@ func (pb *Files) makeNewSortfile(pf *File) error {
pf.findFunc(wFind)
*/
- pf.specialBases(wSort, wFind)
+ header(wFind, pf)
+ pf.syncLock(wFind)
+ pf.specialBases(wFind)
// attempt to add sort functions for pf.Base
if err := pf.processMessage(pf.Bases, wSort, wFind); err != nil {
@@ -57,7 +51,7 @@ func (pb *Files) makeNewSortfile(pf *File) error {
return nil
}
-func (pf *File) specialBases(wSort, wFind io.Writer) {
+func (pf *File) specialBases(wFind io.Writer) {
var FRUIT string = cases.Title(language.English, cases.NoLower).String(pf.Bases.Name)
var APPLES string = cases.Title(language.English, cases.NoLower).String(pf.Bases.Name)
var APPLE string = cases.Title(language.English, cases.NoLower).String(pf.Base.Name)