Commit Graph

52 Commits

Author SHA1 Message Date
Alex Rakoczy e4e9e19427 Fix error when printing usage for multi-value arguments
We try to compare []strings, which are uncomparable types:

`panic: runtime error: comparing uncomparable type []string`
2015-12-04 09:59:13 -05:00
Alex Flint ce5525d776 Merge pull request #19 from walle/add_default_value_to_usage
Add default values to usage
2015-11-26 22:10:36 +10:30
Fredrik Wallgren 670c7b787d
Fix merge conflicts 2015-11-22 01:06:44 +01:00
Fredrik Wallgren b0d37d1fb2 Add default values to usage
Check if the value isn't it's zero value and if not add a default value
to the usage text.
2015-11-22 00:53:29 +01:00
Alex Flint 5db9c77fa3 Merge pull request #13 from walle/show_builtin
Add built ins to options in help output
2015-11-22 10:04:14 +10:30
Fredrik Wallgren 330a0da571
Add built ins to options in help output
Adds help to the options in help output with an easy way to add more
built ins.
2015-11-16 13:23:58 +01:00
Alex Flint 785fa3f8c9 Merge pull request #16 from walle/move_doc
Move package documentation to doc.go
2015-11-15 11:01:00 +10:30
Alex Flint c4704194de Merge pull request #14 from walle/usage_on_stderr_bug
Fix bug with error not being written to stderr
2015-11-11 09:34:05 -08:00
Alex Flint 0f9dfa27d1 Merge pull request #15 from walle/fix_lint_warning
Fix lint warning
2015-11-11 09:33:24 -08:00
Fredrik Wallgren ab43eae565
Move package documentation to doc.go 2015-11-11 14:16:39 +01:00
Fredrik Wallgren d6a447ed7c
Fix lint warning 2015-11-11 14:08:28 +01:00
Fredrik Wallgren df17f4df45
Fix bug with error not being written to stderr
Only the usage message was written to stderr, the error was written with
the standard fmt.Println.
2015-11-11 10:29:01 +01:00
Alex Flint a49bba8533 Merge pull request #10 from walle/fail_to_stderr
Write usage message to stderr on error
2015-11-09 10:04:37 -08:00
Alex Flint a6c77a413a Merge pull request #7 from brettlangdon/dev/trailing.whitespace.sqwished
Remove excess trailing whitespace from Usage generation
2015-11-09 09:54:04 -08:00
Fredrik Wallgren 935b2a1bd5
Write usage message to stderr on error
When the parsing of parameters/flags fails eg. when a required flag is
missing, print the usage statement and error to stderr instead of
stdout.
2015-11-09 10:27:15 +01:00
brettlangdon 383b8b84c1 Remove excess trailing whitespace from Usage generation 2015-11-07 09:39:23 -05:00
Alex Flint 53364a0be4 Merge pull request #6 from alexflint/coveralls_badge
Add coveralls badge
2015-11-04 11:00:56 -08:00
Alex Flint 239d0c1c6f add coveralls badge 2015-11-04 10:58:20 -08:00
Alex Flint 4ca36520b3 Merge pull request #5 from alexflint/usage_tests
Add more tests for parser
2015-11-04 10:56:33 -08:00
Alex Flint 70c56eff66 add more tests 2015-11-04 10:27:17 -08:00
Alex Flint 16cae5fe0c Merge pull request #4 from alexflint/usage_tests
add tests for usage info
2015-11-04 10:04:36 -08:00
Alex Flint 9111061915 add tests for usage info 2015-11-04 09:47:58 -08:00
Alex Flint 3bcc30f8fe Merge pull request #3 from alexflint/add_coveralls
add coveralls to .travis.yml
2015-11-04 09:23:10 -08:00
Alex Flint 6a22722d8c add coveralls to .travis.yml 2015-11-04 09:12:41 -08:00
Alex Flint 5185642348 fix note on boolean flags in readme 2015-11-03 08:15:45 -08:00
Alex Flint 95bf6f25e0 fix first example in docs - h/t eric somerlade 2015-11-01 21:55:52 -08:00
Alex Flint 60f2612c0c separate help into WriteUsage and WriteHelp 2015-11-01 13:53:51 -08:00
Alex Flint bcb41ba048 add travis badge 2015-11-01 13:40:27 -08:00
Alex Flint 4d271f5326 fix float test for go1.4 2015-11-01 13:38:04 -08:00
Alex Flint 8b5a16fafe fix examples 2015-11-01 13:36:14 -08:00
Alex Flint 3ff6f256dc remove extra go gets in travis 2015-11-01 13:26:43 -08:00
Alex Flint f042ab6386 add .travis.yml 2015-11-01 13:24:35 -08:00
Alex Flint cd9f5188a8 fix example 2015-11-01 11:40:09 -08:00
Alex Flint beede9329a added runnable examples 2015-11-01 11:34:22 -08:00
Alex Flint 30befae91a move more stuff over to the parser struct 2015-11-01 00:13:23 -07:00
Alex Flint f427e9f317 added parser struct 2015-10-31 23:57:26 -07:00
Alex Flint 026a824666 udpate readme 2015-10-31 19:15:43 -07:00
Alex Flint b666b30474 udpate readme 2015-10-31 19:15:08 -07:00
Alex Flint 19d956870f udpate readme 2015-10-31 19:14:11 -07:00
Alex Flint 6dc9bbbdfd udpate readme 2015-10-31 19:13:48 -07:00
Alex Flint 2ac8f555a5 udpate readme 2015-10-31 19:10:13 -07:00
Alex Flint aa20f7be39 udpate readme 2015-10-31 18:51:21 -07:00
Alex Flint 6582088596 udpate readme 2015-10-31 18:49:20 -07:00
Alex Flint 04e96c0c6b udpate readme 2015-10-31 18:48:38 -07:00
Alex Flint 22c73471e6 add README 2015-10-31 18:46:56 -07:00
Alex Flint 7e1437715b add example.go 2015-10-31 18:32:43 -07:00
Alex Flint 76293a5a72 add usage.go 2015-10-31 18:32:20 -07:00
Alex Flint bdbdf034c7 Merge branch 'master' of github.com:alexflint/go-arg 2015-10-31 18:31:38 -07:00
Alex Flint c131173edd Initial commit 2015-10-31 18:30:06 -07:00
Alex Flint b9ad104f33 added usage generation 2015-10-31 18:26:58 -07:00