Пример #1
0
func TestLighthouseJsonFile(t *testing.T) {
	err := conf.LoadConfig("./lighthouse.json.sample")
	if err != nil {
		t.Fatal(err)
	} else {
		t.Log("lighthouse.json pass!")
	}
}
Пример #2
0
func main() {
	flag.Parse()
	var err error
	if *showVersion {
		printVersionAndExit()
	}
	if !*useDefaltConfig {
		err = conf.LoadConfig(*configLocation)
	} else {
		log.Println("use default config")
	}
	if err == nil {
		web.Start()
	} else {
		log.Fatalln(err)
	}
}