// ConnURL returns a valid non pool connection url (can be used with go-migrate
// or sql.db)
ConnURL returns a valid non pool connection url (can be used with go-migrate
or sql.db)
// ConnURL returns a valid non pool connection url ( can be used with go - migrate // or sql . db )
func (pu PoolURL) ConnURL() PoolURL {
	u, err := url.Parse(string(pu))
	if err != nil {
		panic(err)
	}
	q := u.Query()
	for _, k := range []string{
		"pool_max_conns",
		"pool_min_conns",
		"pool_max_conn_lifetime",
		"pool_max_conn_idle_time",
		"pool_health_check_period",
	} {
		q.Del(k)
	}
	u.RawQuery = q.Encode()
	return PoolURL(u.String())
}
func ( pu PoolURL ) ConnURL ( ) PoolURL { u , err := url . Parse ( string ( pu ) ) if err != nil { panic ( err ) } q := u . Query ( ) for _ , k := range [ ] string { " " , " " , " " , " " , " " , } { q . Del ( k ) } u . RawQuery = q . Encode ( ) return PoolURL ( u . String ( ) ) }
ConnURL returns a valid non pool connection url (can be used with go-migrate
or sql.db)
ConnURL returns a valid non pool connection url ( can be used with go - migrate or sql . db )