June 2017
Intermediate to advanced
400 pages
10h 32m
English
These steps cover writing and running your application:
package pools import ( "database/sql" "fmt" "os" _ "github.com/go-sql-driver/mysql" //we import supported libraries for database/sql ) // Setup configures the db along with pools // number of connections and more func Setup() (*sql.DB, error) { db, err := sql.Open("mysql", fmt.Sprintf("%s:%s@/gocookbook? parseTime=true", os.Getenv("MYSQLUSERNAME"), os.Getenv("MYSQLPASSWORD"))) ...Read now
Unlock full access