Fix example URL shortener

scan-io
Jack Christensen 2014-05-17 13:46:05 -05:00
parent 9067b2d991
commit 9f50796f1b
1 changed files with 2 additions and 2 deletions
examples/url_shortener

View File

@ -97,13 +97,13 @@ func urlHandler(w http.ResponseWriter, req *http.Request) {
func main() {
var err error
connectionOptions := pgx.ConnConfig{
connConfig := pgx.ConnConfig{
Host: "127.0.0.1",
User: "jack",
Password: "jack",
Database: "url_shortener"}
poolOptions := pgx.ConnPoolConfig{MaxConnections: 5, AfterConnect: afterConnect}
pool, err = pgx.NewConnectionPool(connectionOptions, poolOptions)
pool, err = pgx.NewConnPool(connConfig, poolOptions)
if err != nil {
fmt.Fprintf(os.Stderr, "Unable to create connection pool: %v\n", err)
os.Exit(1)