Closed ghost closed 13 years ago
It seems Git decided to list the Example fixes as well. I rewrote the examples to use the updated method signatures. Added usage of the defer statement to ensure the database and Statements are properly closed upon exit of the app. I removed the hard coded user credentials from the examples and replaced them with command line arguments by using the flag package.
Added a makefile to the Examples dir to allow building of examples with 1 make command.
Strings are immutable in Go. When building a string in a loop, avoid += and use a byte buffer instead. Comparative tests on my machine show a 7x speed increase.