Start refactor of code into what I think is a more modular way of working

This commit is contained in:
2020-01-26 12:16:37 +00:00
parent eadbe9e743
commit 3e6bcbc5a8
8 changed files with 236 additions and 72 deletions
+2 -31
View File
@@ -1,41 +1,12 @@
package main
import (
"fmt"
"github.com/starkers/safer-eve/pkg/eve"
"time"
)
func main() {
fmt.Println("searching")
//logDirs := eve.PathSearch()
//fmt.Println(a)
fileList := eve.FileSearchUnix()
//List := eve.GetActiveChannels(fileList)
//for _, name := range List{
// fmt.Println(name)
//}
//for _, d := range logDirs {
// fmt.Println(d)
// go eve.WatchPath(d)
//}
for _, f := range fileList{
if eve.IsCurrentLog(f) {
//if strings.Contains(f, "delve.imperium") {
// fmt.Printf("tailing file: %v\n", f)
go eve.Tail(f)
//}
}
//else {
// fmt.Println(f)
//}
}
time.Sleep(9999 * time.Hour)
//Think about some cli params that might be useful later.
eve.Init()
}