You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
293 B
Go
24 lines
293 B
Go
7 years ago
|
package main
|
||
|
|
||
|
import (
|
||
|
"flag"
|
||
|
"log"
|
||
|
)
|
||
|
|
||
|
var _config *conf
|
||
|
|
||
|
func main() {
|
||
|
var configfile string
|
||
|
flag.StringVar(&configfile, "c", "config.yaml", "config file")
|
||
|
flag.Parse()
|
||
|
|
||
|
cfg, err := loadConfig(configfile)
|
||
|
if err != nil {
|
||
|
log.Fatal(err)
|
||
|
}
|
||
|
_config = cfg
|
||
|
|
||
|
initHandler()
|
||
|
select {}
|
||
|
}
|