Skip to content

Commit 84d750d

Browse files
committed
Code review and tidy up of comments and other minor changes
1 parent 884fbb9 commit 84d750d

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

csv2sql.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@
77
author: simon rowe <[email protected]>
88
license: open-source released under "New BSD License"
99
10-
version: 0.6
11-
created: 16th April 2014 - initial outline code written
12-
updated: 17th April 2014 - add flags and output file handling
13-
updated: 27th April 2014 - wrap in double quotes instead of single
14-
updated: 28th April 2014 - add flush io file buffer to fix SQL missing EOF
15-
updated: 19th July 2014 - add more help text, tidy up comments and code
16-
updated: 6th August 2014 - enabled the -k flag to alter the table header characters
17-
updated: 28th September 2014 - changed default output when run with no params, add -h
10+
created: 16 Apr 2014 - initial outline code written
11+
updated: 17 Apr 2014 - add flags and output file handling
12+
updated: 27 Apr 2014 - wrap in double quotes instead of single
13+
updated: 28 Apr 2014 - add flush io file buffer to fix SQL missing EOF
14+
updated: 19 Jul 2014 - add more help text, tidy up comments and code
15+
updated: 06 Aug 2014 - enabled the -k flag to alter the table header characters
16+
updated: 28 Sep 2014 - changed default output when run with no params, add -h
1817
to display the help info and also still call flags.Usage()
19-
updated: 09th December 2014 - minor tidy up and first 'release' provided on GitHub
18+
updated: 09 Dec 2014 - minor tidy up and first 'release' provided on GitHub
19+
updated: 27 Aug 2016 - table name and csv file help output minior changes. Minor cosmetic stuff. Version 1.1
2020
2121
*/
2222
package main
@@ -42,7 +42,7 @@ import (
4242
// TODO - make more stdout/stderror friendly for command line use
4343
// TODO - provide option to use with pipes to feed-in csv file and pipe output
4444
//
45-
var appversion string = "1.0"
45+
var appversion string = "1.1"
4646

4747
// below used by flag for command line args
4848
var tableName string
@@ -208,7 +208,7 @@ func main() {
208208

209209
// check we have a table name and csv file to work with - otherwise abort
210210
if csvFileName == "" || tableName == "" {
211-
fmt.Println("ERROR: please provide both a 'table name' and the input 'CSV filename' to use\nrun 'csv2sql -h' for more information")
211+
fmt.Println("ERROR: please provide both a '-t table_name' and the input '-f \"CSV input filename\"' to use\nrun 'csv2sql -h' for more information")
212212
//fmt.Println("Usage:",flag.Usage,"Command Line:",flag.CommandLine)
213213
os.Exit(-2)
214214
}

0 commit comments

Comments
 (0)