Skip to content

Latest commit

 

History

History

go-contacts

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Databases in Go

This example uses sqlx along with pgx to connect to a DigitalOcean PostgreSQL database, with support for JSONB (see the favorites column in the dataset).

  1. Import the dataset if necessary
  2. Install the dependencies: go get -u -v ./...
  3. Build the app: go build .
  4. Prepare your PostgreSQL connection string. See the examples README
  5. Start the app: ./go-contacts -conn "PostgreSQL Connection String"
    • You can alternatively pass the connection string in an environment variable named DATABASE_URL