package main import ( "bufio" "flag" "fmt" "os" "github.com/Shugyousha/stasher/conf" ) func main() { var configpath *string configpath = flag.String("c", "stasher.cfg", "Path to config file") flag.Parse() f, err := os.Open(*configpath) if err != nil { fmt.Fprintf(os.Stderr, "Could not open config file %q: %q\n", *configpath, err) os.Exit(1) } m := conf.NewManagerFromConfig(bufio.NewReader(f)) fmt.Fprintf(os.Stderr, "manager: %#v\n", m) m.Run() }