mirror of
https://github.com/miniflux/v2.git
synced 2025-06-27 16:36:00 +00:00
Update vendor dependencies
This commit is contained in:
parent
34a3fe426b
commit
459bb4531f
747 changed files with 89857 additions and 39711 deletions
33
vendor/github.com/lib/pq/connector_example_test.go
generated
vendored
Normal file
33
vendor/github.com/lib/pq/connector_example_test.go
generated
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
// +build go1.10
|
||||
|
||||
package pq_test
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"fmt"
|
||||
|
||||
"github.com/lib/pq"
|
||||
)
|
||||
|
||||
func ExampleNewConnector() {
|
||||
name := ""
|
||||
connector, err := pq.NewConnector(name)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return
|
||||
}
|
||||
db := sql.OpenDB(connector)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return
|
||||
}
|
||||
defer db.Close()
|
||||
|
||||
// Use the DB
|
||||
txn, err := db.Begin()
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return
|
||||
}
|
||||
txn.Rollback()
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue