Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type URL ¶
func Parse ¶
Example ¶
u := Parse( "postgres://develop:@localhost/goods_orders_dev?sslmode=disable", ) fmt.Println(u.URL) fmt.Println(u.MaxOpen, u.MaxIdle, u.MaxLife)
Output: postgres://develop:@localhost/goods_orders_dev?sslmode=disable 10 1 10m0s
Example (WithParams) ¶
u := Parse( "postgres://develop:@localhost/goods_orders_dev" + "?sslmode=disable&maxIdle=1&maxOpen=20&maxLife=1h", ) fmt.Println(u.URL) fmt.Println(u.MaxOpen, u.MaxIdle, u.MaxLife)
Output: postgres://develop:@localhost/goods_orders_dev?sslmode=disable 20 1 1h0m0s
Click to show internal directories.
Click to hide internal directories.