35 lines
467 B
Go
35 lines
467 B
Go
package main
|
|
|
|
import (
|
|
"flag"
|
|
"log"
|
|
|
|
"git.trj.tw/golang/fblook/module/background"
|
|
"git.trj.tw/golang/fblook/module/config"
|
|
"git.trj.tw/golang/fblook/module/options"
|
|
)
|
|
|
|
func init() {
|
|
options.RegFlag()
|
|
flag.Parse()
|
|
}
|
|
|
|
func main() {
|
|
cc := make(chan bool, 0)
|
|
runOptions := options.GetFlag()
|
|
|
|
if runOptions.Help {
|
|
flag.Usage()
|
|
return
|
|
}
|
|
|
|
err := config.LoadConfig(runOptions.Config)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
|
|
background.SetBackground()
|
|
|
|
<-cc
|
|
}
|