From c9f798b4d9a500fcf93931df2464af969d68f516 Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Mon, 31 May 2021 07:13:37 -0500 Subject: [PATCH] Updated Getting started with pgx through database sql (markdown) --- Getting-started-with-pgx-through-database-sql.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Getting-started-with-pgx-through-database-sql.md b/Getting-started-with-pgx-through-database-sql.md index 2f25e61..c413190 100644 --- a/Getting-started-with-pgx-through-database-sql.md +++ b/Getting-started-with-pgx-through-database-sql.md @@ -10,10 +10,10 @@ pgx requires a recent version of Go with module support. Use the `go version` co ``` $ go version -go version go1.14.2 darwin/amd64 +go version go1.16.4 darwin/amd64 ``` -The version should be at least 1.13. +The version should be at least 1.15. pgx also requires a PostgreSQL database that is accessible from your host. Use `psql` to test your connection. @@ -46,6 +46,13 @@ $ go mod init hello go: creating new go.mod: module hello ``` +Add pgx to your Go modules: + +``` +$ go get github.com/jackc/pgx/v4 +go get: added github.com/jackc/pgx/v4 v4.11.0 +``` + ## Hello world from PostgreSQL Create the file `main.go` and copy and paste the following: