Skip to content

Commit 09517bf

Browse files
committed
remove debug prints
1 parent b3900b8 commit 09517bf

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed

monitor/monitor.go

+4-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
package monitor
44

55
import (
6-
"fmt"
76
"log"
87
"os"
98
"path/filepath"
@@ -60,7 +59,7 @@ func WatchWiki(w *wiki.Wiki) {
6059
}
6160
dirs[dir] = handler
6261
if err := filepath.Walk(dir, walkDir); err != nil {
63-
fmt.Println("ERROR", err)
62+
log.Println("ERROR", err)
6463
}
6564
}
6665

@@ -89,7 +88,7 @@ func WatchWiki(w *wiki.Wiki) {
8988
// new directory created -- add to monitor
9089
fi, err := os.Lstat(abs)
9190
if err == nil && fi.IsDir() && event.Op&fsnotify.Create == fsnotify.Create {
92-
fmt.Println("adding dir", abs)
91+
log.Println("adding dir", abs)
9392
mon.watching[abs] = true
9493
watcher.Add(abs)
9594
continue
@@ -98,7 +97,7 @@ func WatchWiki(w *wiki.Wiki) {
9897
// a directory we were watching has been deleted
9998
// note: this catches renames also
10099
if mon.watching[abs] && event.Op&fsnotify.Remove == fsnotify.Remove {
101-
fmt.Println("DELETE DIR", event)
100+
log.Println("DELETE DIR", event)
102101
delete(mon.watching, abs)
103102
// watcher.Remove(abs) // nvm, it does this automatically
104103
continue
@@ -114,7 +113,7 @@ func WatchWiki(w *wiki.Wiki) {
114113

115114
// watch for errors
116115
case err := <-watcher.Errors:
117-
fmt.Println("ERROR", err)
116+
log.Println("ERROR", err)
118117
}
119118
}
120119
}()

wikifier/block-infobox.go

-6
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ func (is *infosec) multi() bool {
5555

5656
// parse parses the infosec contents.
5757
func (is *infosec) parse(page *Page) {
58-
// fmt.Printf("is.Map: %v\n", is.Map.mapList)
5958
is.Map.parse(page)
6059
}
6160

@@ -81,8 +80,6 @@ func (is *infosec) html(page *Page, els element) {
8180
}
8281

8382
infoTableAddRows(is, els, page, is.mapList)
84-
85-
// fmt.Printf("After infosec{} html(%V)endhtml", els.generate())
8683
}
8784

8885
// INTERNALS
@@ -92,11 +89,8 @@ func (is *infosec) html(page *Page, els element) {
9289
func infoTableAddRows(infoboxOrSec block, table element, page *Page, pairs []*mapListEntry) {
9390
hasTitle := false
9491

95-
// fmt.Printf("addRows for %v; %v items\n", infoboxOrSec.String(), len(pairs))
96-
9792
// add a row for each entry
9893
for i, entry := range pairs {
99-
// fmt.Printf("...add item: value(%+v)\n", entry)
10094

10195
// if the value is from infosec{}, add each row
10296
if els, ok := entry.value.(element); ok && els.meta("isInfosec") {

wikifier/page.go

-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ func (p *Page) Parse() error {
103103
return err
104104
}
105105
d := markdown.Run(md)
106-
fmt.Println(string(d))
107106
reader = bytes.NewReader(d)
108107
} else if p.FilePath != "" {
109108
file, err := os.Open(p.FilePath)

0 commit comments

Comments
 (0)