[Solved] Too many arguments to return


You’ve declared the function GetDBConnection() to return no arguments.

func GetDBConnection() {

You have to tell Go the type of the argument you intend to return:

func GetDBConnection() *sqlx.DB {

As for determining the type, I just went to look at the source code. You could also look at the documentation on godoc.org, which is auto-generated from publicly available Go packages.

8

solved Too many arguments to return