diff options
| author | Jeff Carr <[email protected]> | 2025-01-12 09:55:09 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-01-12 09:55:09 -0600 |
| commit | b5002b158b10db3bf89cb6157700390911d53bea (patch) | |
| tree | cb7c8edfe12721509e9fa3cb01431bcda152e12d /generateMutex.go | |
| parent | 4e0b3b8f3873e1784b8ad43394c1ad8f8a9fb4fb (diff) | |
more cleanups
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, "") |
