mirror of
https://github.com/DominicBreuker/pspy.git
synced 2025-12-21 03:34:50 +00:00
add tests for main method
This commit is contained in:
11
cmd/root.go
11
cmd/root.go
@@ -7,6 +7,7 @@ import (
|
||||
"os/signal"
|
||||
"strings"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/dominicbreuker/pspy/internal/config"
|
||||
"github.com/dominicbreuker/pspy/internal/fswatcher"
|
||||
@@ -69,10 +70,12 @@ func root(cmd *cobra.Command, args []string) {
|
||||
logger := logging.NewLogger()
|
||||
|
||||
cfg := &config.Config{
|
||||
RDirs: rDirs,
|
||||
Dirs: dirs,
|
||||
LogPS: logPS,
|
||||
LogFS: logFS,
|
||||
RDirs: rDirs,
|
||||
Dirs: dirs,
|
||||
LogPS: logPS,
|
||||
LogFS: logFS,
|
||||
DrainFor: 1 * time.Second,
|
||||
TriggerEvery: 100 * time.Millisecond,
|
||||
}
|
||||
fsw := fswatcher.NewFSWatcher()
|
||||
defer fsw.Close()
|
||||
|
||||
Reference in New Issue
Block a user