Skip to content

Postgres

rivo edited this page Jan 7, 2018 · 1 revision

The tview package makes it easy to write terminal based demo applications. The following application is a simple PostgreSQL database browser written in ~300 lines of Go code:

How to Run

Apart from github.com/rivo/tview, the script also uses github.com/lib/pq.

To run it, you must provide the PostgreSQL database connection string (see here for details):

go run src/postgres.go "user='xyz' password='abc' sslmode=disable"

Source Code

You can find the source code for this demo application in this gist.