Golang连接postgres数据库报错

今天在学习B站上一个外国博主的Golang的项目课程的时候,Golang连接postgres数据库报错,错误信息是sql: unknown driver "postgres" (forgotten import?)

解决之道: import 

_ "github.com/lib/pq"

 

posted @ 2022-03-05 21:37  ForMei  阅读(472)  评论(0)    收藏  举报