Skip to content

Commit 3bfc268

Browse files
committed
docs: clean up code formatting in README Quick Start
Signed-off-by: Vedant Madane <6527493+VedantMadane@users.noreply.github.com>
1 parent 6c8cea4 commit 3bfc268

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ func main() {
3737
// urlExample := "postgres://username:password@localhost:5432/database_name"
3838
conn, err := pgx.Connect(context.Background(), os.Getenv("DATABASE_URL"))
3939
if err != nil {
40-
fmt.Fprintf(os.Stderr, "Unable to connect to database: %v
41-
", err)
40+
fmt.Fprintf(os.Stderr, "Unable to connect to database: %v\n", err)
4241
os.Exit(1)
4342
}
4443
defer conn.Close(context.Background())
@@ -47,8 +46,7 @@ func main() {
4746
var weight int64
4847
err = conn.QueryRow(context.Background(), "select name, weight from widgets where id=$1", 42).Scan(&name, &weight)
4948
if err != nil {
50-
fmt.Fprintf(os.Stderr, "QueryRow failed: %v
51-
", err)
49+
fmt.Fprintf(os.Stderr, "QueryRow failed: %v\n", err)
5250
os.Exit(1)
5351
}
5452

0 commit comments

Comments
 (0)