package main import ( "fmt" "gitee.com/wlhet/sqlm" ) var oracleDb *sqlm.Oracle func regOrcle(brand string) { url := "" switch brand { case "ugg": url = fmt.Sprintf("oracle://bosnds3:Longda2000@%s.imix7.com:1521/orcl", brand) case "hdugg": url = fmt.Sprintf("oracle://bosnds3:Longda2000@%s.imix7.com:1521/orcl", brand) case "ecco": url = fmt.Sprintf("oracle://bosnds3:Longda2000@%s.imix7.com:1521/orcl", brand) } if len(url) == 0 { panic("oracle brand error") } db := sqlm.NewOracle() err := db.Open(url) if err != nil { panic(err) } oracleDb = db }