Your db
var is nil
when used in the different functions because in this line you’re actually declaring a local variable with the same name that shadows the global one:
db, err := sql.Open("postgres", psqlInfo)
1 Like
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.