func main() { log.Info("start collectin file...") path := config.GetString("filepath") if path == "" { log.Error("can't find filepath") os.Exit(0) } input.Run(path) }
func Run(path string) { go ReadFile(path) outtype := config.GetString("outtype") if outtype == "" { log.Error("cat't find outtype") os.Exit(0) } router.Run(&logstream, outtype) }