From e84e81f1c486ac6c115d5e13877b8ea7a3375f22 Mon Sep 17 00:00:00 2001 From: Cian Gallagher Date: Sun, 12 Dec 2021 23:06:05 +0000 Subject: [PATCH] MAIN: Abstract functionality & boilerplate to watch cmd. --- cmd/main.go | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/cmd/main.go b/cmd/main.go index e58b6b0..f299019 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -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() }