Inspired by Arturom's awesome mysql2json python script. Connects to a MySQL database and prints JSON formatted records to STDOUT...but using Golang!
./app -host=server -port=3306 -user=hello -password=hola -database=bonjour -query="SELECT * FROM products LIMIT 1"
SELECT * FROM products;
+----+----------------+-------------------+
| id | name | quantity |
+----+----------------+-------------------+
| 1 | TLR 22 3.0 | 1 |
+----+----------------+-------------------+
[{"id":"1","name":"TLR 22 3.0","quantity":"1"}]