summaryrefslogtreecommitdiff
path: root/sort.go
diff options
context:
space:
mode:
Diffstat (limited to 'sort.go')
-rw-r--r--sort.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/sort.go b/sort.go
index bc376ed..1d202a6 100644
--- a/sort.go
+++ b/sort.go
@@ -7,10 +7,11 @@ import (
"strings"
)
-func makeSortfile() {
- f, _ := os.OpenFile(sortmap["protobase"]+".sort.pb.go", os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644)
+// passes in the protobuf file protobuf
+func (pb *Files) makeSortfile(pf *File) {
+ f, _ := os.OpenFile(pf.Filebase+".sort.pb.go", os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644)
- header(f, sortmap)
+ header(f, pf)
if sortmap["lock"] == "all" {
// if the lock is set to 'all' this means the mutex was put in the protoc-gen-go struct