I use go-sql-driver/mysql to interact with the database.
For the connection, you must transfer the name / password / DB, as usual:
... db, err := sql.Open("mysql", "user:password@/db") ... Question: how correctly to transfer a name / password / bd not directly, but in the form of arguments?
The following option does not work:
db, err := sql.Open("mysql", ("%s:%s@/%s", mysql_user, mysql_passwd, mysql_db))