I saw this post How to avoid annoying error "declared and not used"
but I don't know if this is the right way to handle the error, when I use the variable in other packages.
for example, in case I use Connect()
only in other packages, I don't use variable db
in this package.
func Connect() {
db, err := sql.Open("mysql", "root:Berlin2018@/jplatform")
if err != nil {
panic(err.Error())
}
}