func defaultConfig(it *assert.Assertions, ev env.Vars) db.Config {
	c := db.Config{
		Schema:   db.DefaultSchema,
		Username: dbDefaultUsername,
		Password: "s33kr1t",
		SSLMode:  db.SSLModeDisable,
	}
	ctx := env.WithVars(context.TODO(), ev)
	err := c.Resolve(ctx)
	it.Nil(err)
	// Ensure IPv4 address is used; in some environments where IPv6 may be
	// a problem this can result in unexpected failures of the form
	// > dial tcp [::1]:5432: connect: cannot assign requested address
	if c.Host == db.DefaultHost {
		c.Host = ipv4Loopback
	}
	return c
}
// defaultConfig returns a database config that sets a few defaults and then
// uses environment variables to populate the rest.
defaultConfig returns a database config that sets a few defaults and then
uses environment variables to populate the rest.
// defaultConfig returns a database config that sets a few defaults and then // uses environment variables to populate the rest .
func defaultConfig(it *assert.Assertions, ev env.Vars) db.Config {
	c := db.Config{
		Schema:   db.DefaultSchema,
		Username: dbDefaultUsername,
		Password: "s33kr1t",
		SSLMode:  db.SSLModeDisable,
	}
	ctx := env.WithVars(context.TODO(), ev)
	err := c.Resolve(ctx)
	it.Nil(err)
	if c.Host == db.DefaultHost {
		c.Host = ipv4Loopback
	}
	return c
}
func defaultConfig ( it * assert . Assertions , ev env . Vars ) db . Config { c := db . Config { Schema : db . DefaultSchema , Username : dbDefaultUsername , Password : " " , SSLMode : db . SSLModeDisable , } ctx := env . WithVars ( context . TODO ( ) , ev ) err := c . Resolve ( ctx ) it . Nil ( err ) if c . Host == db . DefaultHost { c . Host = ipv4Loopback } return c }
defaultConfig returns a database config that sets a few defaults and then
uses environment variables to populate the rest.
defaultConfig returns a database config that sets a few defaults and then uses environment variables to populate the rest .
// Ensure IPv4 address is used; in some environments where IPv6 may be // a problem this can result in unexpected failures of the form // > dial tcp [::1]:5432: connect: cannot assign requested address