package main

import (
	"fmt"
)

func main() {
	fmt.Println("========================= OMC loadpconf startup =========================")
	fmt.Println("OMC loadpconf version: %s %s %s", version, buildTime, goVer)

	for _, f := range pfiles {
		fmt.Println("f:", f)
		paramMap := ReadParamConfig(f)
		fmt.Println("paramMap:", paramMap)
		db := yamlConfig.Database
		sqlStr := fmt.Sprintf("%s:%s@tcp(%s:%s)/%s", db.User, db.Password, db.Host, db.Port, db.Name)
		XormConnectDatabaseWithUri(sqlStr)
		XormInsertParamConfig(paramMap)
	}

}
