diff options
author | KatolaZ <katolaz@freaknet.org> | 2017-08-07 09:46:27 +0100 |
---|---|---|
committer | KatolaZ <katolaz@freaknet.org> | 2017-08-07 09:46:27 +0100 |
commit | d3105e671a19fec1060652531ce783227fb9fab6 (patch) | |
tree | eec4fd66285ef2d65f4c52a55c07780906fdea10 /spooler.go | |
parent | 587c8bf41568c9624f9874bb4e2549227c1e3b63 (diff) |
type renamed to avoid the SCORSH prefix
Diffstat (limited to 'spooler.go')
-rw-r--r-- | spooler.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -11,7 +11,7 @@ import ( ) // parse a request file and return a SCORSHmessage -func parseRequest(fname string, msg *SCORSHmsg) error { +func parseRequest(fname string, msg *spoolMsg) error { debug.log("[parseRequest] message at start: %s\n", msg) @@ -33,7 +33,7 @@ func parseRequest(fname string, msg *SCORSHmsg) error { return nil } -func spooler(watcher *fsnotify.Watcher, master chan SCORSHmsg) { +func spooler(watcher *fsnotify.Watcher, master chan spoolMsg) { log.Println("Spooler started correctly") @@ -44,7 +44,7 @@ func spooler(watcher *fsnotify.Watcher, master chan SCORSHmsg) { // "Write" event, which should happen only when the file is // created if event.Op == fsnotify.Write { - var msg SCORSHmsg + var msg spoolMsg debug.log("[spooler] new file %s detected\n", event.Name) err := parseRequest(event.Name, &msg) if err != nil { @@ -71,7 +71,7 @@ func spooler(watcher *fsnotify.Watcher, master chan SCORSHmsg) { } } -func startSpooler(master *SCORSHmaster) error { +func startSpooler(master *master) error { watcher, err := fsnotify.NewWatcher() |