func pconf() {
	if err := config.Parse(*conf); err != nil {
		fmt.Println("cannot parse configuration file:", err)
		os.Exit(1)
	}
}
parse configuration file
package main
import (
	"flag"
	"fmt"
	"os"
	"os/signal"
	"syscall"
	"github.com/shanghai-edu/n9e-probe/config"
	"github.com/shanghai-edu/n9e-probe/http"
	"github.com/shanghai-edu/n9e-probe/probe"
	"github.com/shanghai-edu/n9e-probe/probe/core"
	"github.com/toolkits/pkg/file"
	"github.com/toolkits/pkg/logger"
	"github.com/toolkits/pkg/runner"
)
var (
	vers *bool
	help *bool
	conf *string
)
func init() {
	vers = flag.Bool("v", false, "display the version.")
	help = flag.Bool("h", false, "print this help.")
	conf = flag.String("f", "", "specify configuration file.")
	flag.Parse()
	if *vers {
		fmt.Println("version:", config.Version)
		os.Exit(0)
	}
	if *help {
		flag.Usage()
		os.Exit(0)
	}
}
func main() {
	aconf()
	pconf()
	start()
	cfg := config.Get()
	config.InitLog(cfg.Logger)
	core.InitRpcClients()
	probe.BuildMappers()
	probe.Collect()
	http.Start()
	ending()
}
func aconf() {
	if *conf != "" && file.IsExist(*conf) {
		return
	}
	*conf = "etc/probe.local.yml"
	if file.IsExist(*conf) {
		return
	}
	*conf = "etc/probe.yml"
	if file.IsExist(*conf) {
		return
	}
	fmt.Println("no configuration file for probe")
	os.Exit(1)
}