func CreateDBConnection(username string, password string, host string, port uint16) (dbconn *DB, err error) {
	var dbAddr net.Addr
	if dbAddr, err = net.ResolveTCPAddr("tcp", net.JoinHostPort(host, fmt.Sprintf("%d", port))); err != nil {
		err = fmt.Errorf("Error resolving database address: \n%s", err)
		return
	}

	dbconn = &DB{
		dbAddr:     dbAddr,
		dbUsername: username,
		dbPassword: password,
	}
	return
}
// CreateDBConnection initializes the db so the client is ready to be set up. We use TCP by default
CreateDBConnection initializes the db so the client is ready to be set up. We use TCP by default
// CreateDBConnection initializes the db so the client is ready to be set up . We use TCP by default
func CreateDBConnection(username string, password string, host string, port uint16) (dbconn *DB, err error) {
	var dbAddr net.Addr
	if dbAddr, err = net.ResolveTCPAddr("tcp", net.JoinHostPort(host, fmt.Sprintf("%d", port))); err != nil {
		err = fmt.Errorf("Error resolving database address: \n%s", err)
		return
	}
	dbconn = &DB{
		dbAddr:     dbAddr,
		dbUsername: username,
		dbPassword: password,
	}
	return
}
func CreateDBConnection ( username string , password string , host string , port uint16 ) ( dbconn * DB , err error ) { var dbAddr net . Addr if dbAddr , err = net . ResolveTCPAddr ( " " , net . JoinHostPort ( host , fmt . Sprintf ( " " , port ) ) ) ; err != nil { err = fmt . Errorf ( " \n " , err ) return } dbconn = & DB { dbAddr : dbAddr , dbUsername : username , dbPassword : password , } return }
CreateDBConnection initializes the db so the client is ready to be set up.
CreateDBConnection initializes the db so the client is ready to be set up .