Skip to content

Commit

Permalink
MAIN: Abstract functionality & boilerplate to watch cmd.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cian911 committed Dec 12, 2021
1 parent 513235e commit e84e81f
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions cmd/main.go
Original file line number Diff line number Diff line change
@@ -1,23 +1,5 @@
package main

import (
"github.com/cian911/switchboard/watcher"
)

func main() {
path := "/Users/cian.gallagher/input"
destination := "/Users/cian.gallagher/output"

var pw watcher.Producer = &watcher.PathWatcher{
Path: path,
}

var pc watcher.Consumer = &watcher.PathConsumer{
Path: path,
Destination: destination,
Ext: ".txt",
}

pw.Register(&pc)
pw.Observe()
Watch()
}

0 comments on commit e84e81f

Please sign in to comment.