package main

import (
	"fmt"
)

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

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

}
