September 2017
Intermediate to advanced
466 pages
9h 33m
English
In this subsection, we will present a Go utility that executes a query on a MySQL table. The name of the new command-line utility will be showMySQL.go and will be presented in five parts.
The presented utility requires two parameters: a username with administrative privileges and its password.
The first part of showMySQL.go is the following:
package main import ( "database/sql" "fmt" _ "github.com/go-sql-driver/mysql" "os" "text/template" )
There is a small change here, as showMySQL.go uses text/template instead of html/template. Note that the ...
Read now
Unlock full access