Alex Flint
45474a9b25
Merge pull request #33 from walle/multiple
...
Defaults for multiples, intended behaviour
2016-03-04 09:35:36 -08:00
Fredrik Wallgren
1488562b1e
Allow override of defaults for slice arguments
...
This commit fixes a bug where if a multiple value argument (slice) has default
values, the submitted values will be appended to the default. Not
overriding them as expected.
2016-02-29 22:05:26 +01:00
Alex Flint
aaae1550b7
Merge pull request #32 from alexflint/override_program_name
...
make it possible to override the name of the program
2016-02-22 06:39:41 -08:00
Alex Flint
77dd0df006
Merge pull request #31 from alexflint/parse_ip_mac_and_email
...
Parse IP addresses, MAC addresses, and email addresses
2016-01-23 21:07:42 -08:00
Alex Flint
a1c72f6aa9
Merge remote-tracking branch 'origin/master' into parse_ip_mac_and_email
2016-01-23 21:03:51 -08:00
Alex Flint
c0809e537f
Merge pull request #30 from alexflint/scalar_pointers
...
add support for pointers and TextUnmarshaler
2016-01-23 21:03:39 -08:00
Alex Flint
c9584269b9
added tests for MAC and email addresses
2016-01-23 20:58:43 -08:00
Alex Flint
9a30acda05
added tests for IP address parsing
2016-01-23 20:55:40 -08:00
Alex Flint
e389d7f782
add support for IP address, email address, and MAC address
2016-01-23 20:49:57 -08:00
Alex Flint
8fee8f7bbe
move installation instructions to top
2016-01-23 20:11:51 -08:00
Alex Flint
95761fa14a
update readme with new additions
2016-01-23 20:08:00 -08:00
Alex Flint
b5933a0ea8
Merge remote-tracking branch 'origin/master' into scalar_pointers
2016-01-23 19:42:36 -08:00
Alex Flint
93247e2f3b
Merge pull request #29 from alexflint/parse_duration
...
Add support for time.Duration fields
2016-01-23 19:42:21 -08:00
Alex Flint
865cc5a973
add support for pointers and TextUnmarshaler
2016-01-23 19:40:15 -08:00
Alex Flint
64a4bab550
add test for invalid durations
2016-01-23 18:35:08 -08:00
Alex Flint
ed2b19f2bb
add support for time.Duration fields
2016-01-23 18:28:35 -08:00
Alex Flint
e560d079ba
Merge pull request #9 from brettlangdon/dev/environment.variables.sqwished
...
Add support for environment variables
2016-01-18 11:37:38 -08:00
brettlangdon
8dd29d34bf
Add support for environment variables
2016-01-18 13:42:04 -05:00
Alex Flint
b1ec8c9093
make it possible to override the name of the program
2016-01-18 10:31:01 -08:00
Alex Flint
c9155bb0c3
Merge pull request #26 from alexflint/brettlangdon-dev/positional.help.sqwished
...
Resolve some merge conflicts from #8
2016-01-18 08:58:11 -08:00
Alex Flint
4197d283e4
extract common colWidth constant
2016-01-18 08:24:21 -08:00
Alex Flint
77be03b907
resolve merge
2016-01-18 08:19:10 -08:00
Alex Flint
f8ea16beee
Merge pull request #25 from alexflint/return_parser_from_mustparse
...
MustParse returns *Parser
2016-01-05 16:52:13 -08:00
Alex Flint
9aad09fe14
fix example code
2016-01-05 14:00:29 -08:00
Alex Flint
f89698667c
add custom validation example to README
2016-01-05 13:57:01 -08:00
Alex Flint
0c0f9a53ac
MustParse returns *Parser
2016-01-05 13:52:33 -08:00
Alex Flint
d97f8fd931
Merge pull request #24 from toothrot/master
...
Fix error when printing usage for multi-value arguments
2015-12-10 18:28:22 -08:00
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
brettlangdon
d45bd4523c
Display help text for positional arguments
2015-11-21 18:59:40 -05: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