Does your code execute successfully just connecting to the database without doing a query?
--
You received this message because you are subscribed to a topic in the Google Groups "golang-nuts" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-nuts/MS2VW9aFXZs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Hi Jason,Yes the code open's a database connection without errors but the error comes when trying to do the db.exec command.
I'm trying to connect my application with postgres. I followed the instructions in :https://libraries.io/go/github.com%2Flib%2Fpq. I tested in the terminal and shows ok github.com/lib/pg.
but when I run my application says can't find import: "github.com/lib/pq"
someone can help me please.
my application looks like:
import (
"database/sql"
_ "github.com/lib/pq"
)