diff options
Diffstat (limited to 'generateMutex.go')
| -rw-r--r-- | generateMutex.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/generateMutex.go b/generateMutex.go index 790816b..0361895 100644 --- a/generateMutex.go +++ b/generateMutex.go @@ -45,7 +45,7 @@ func (pf *File) syncLock(w io.Writer) { func (pb *Files) addMutex(f *File) error { fullname := f.Pbfilename - log.Info("pb filename:", fullname) + // log.Info("pb filename:", fullname) data, err := os.ReadFile(fullname) if err != nil { log.Info("pb filename failed to read:", err) @@ -55,7 +55,7 @@ func (pb *Files) addMutex(f *File) error { // check if autogenpb has already looked at this file for _, line := range strings.Split(string(data), "\n") { if strings.Contains(line, "autogenpb DO NOT EDIT") { - log.Info("autogenpb has already been run on", fullname) + // log.Info("autogenpb has already been run on", fullname) return nil } } @@ -70,7 +70,7 @@ func (pb *Files) addMutex(f *File) error { lines := strings.Split(string(data), "\n") for _, line := range lines { if strings.HasPrefix(line, "package ") { - log.Info("CHANGING package:", line, "to package:", f.Package) + // log.Info("CHANGING package:", line, "to package:", f.Package) fmt.Fprintln(w, "package "+f.Package) // log.Info("CHANGING package:", line, "to package:main") // fmt.Fprintln(w, "package "+"main") @@ -85,14 +85,14 @@ func (pb *Files) addMutex(f *File) error { if f.structMatch(line) { if argv.Mutex { - log.Info("Adding Mutex to:", line) + // log.Info("Adding Mutex to:", line) fmt.Fprintln(w, line) fmt.Fprintln(w, "\tLock sync.RWMutex // auto-added by go.wit.com/apps/autogenpb") // this must be 'Lock' or Marshal() panics? // fmt.Fprintln(w, "\t// auto-added by go.wit.com/apps/autogenpb") // fmt.Fprintln(w, "\tsync.RWMutex") fmt.Fprintln(w, "") } else { - log.Info("Skipping. Mutex = false for:", line) + // log.Info("Skipping. Mutex = false for:", line) fmt.Fprintln(w, line) fmt.Fprintln(w, "\t// Lock sync.RWMutex // autogenpb skipped this. needs --mutex command line arg") fmt.Fprintln(w, "") |
