// DBFromConfig opens a sql.DB from settings in a db config file
DBFromConfig opens a sql.DB from settings in a db config file
// DBFromConfig opens a sql . DB from settings in a db config file
func DBFromConfig(path string) (db *sqlx.DB, err error) {
	var dbCfg *DBConfig
	dbCfg, err = LoadFile(path)
	if err != nil {
		return nil, err
	}
	return sqlx.Open(dbCfg.DriverName, dbCfg.DataSourceName)
}
func DBFromConfig ( path string ) ( db * sqlx . DB , err error ) { var dbCfg * DBConfig dbCfg , err = LoadFile ( path ) if err != nil { return nil , err } return sqlx . Open ( dbCfg . DriverName , dbCfg . DataSourceName ) }
DBFromConfig opens a sql.DB from settings in a db config file
DBFromConfig opens a sql . DB from settings in a db config file