Commit Graph

1552 Commits

Author SHA1 Message Date
Lynn Cyrin e8eac43d9d Update CHANGELOG.md 2019-08-02 18:26:41 -07:00
Lynn Cyrin 330a9143fb Merge branch 'master' into fix-help-indentation 2019-08-02 18:14:50 -07:00
Lynn Cyrin fa51d00dc6 Update maintainers for current reality 2019-08-02 18:06:15 -07:00
Yogesh Lonkar 01ab016427 Merge branch 'master' into master 2019-08-02 22:03:55 +02:00
Jordan Christiansen c75a689f62 Make exit code example more clear
The purpose of this example is to show that you can exit with an error
code if a flag is unspecified, but with the code as it is, the only way
to cause a non-zero exit is by adding the flag `--ginger-crouton=false`,
which is not explained in the example.

In this new version of the example, running the command with no flag
will exit with an error, and running it with the flag will exit
normally.
2019-08-02 14:28:57 -05:00
Ajitem Sahasrabuddhe 7675649a17 Merge pull request #819 from lynncyrin/required-flags-take-2
Required flags
2019-08-02 22:52:32 +05:30
Ajitem Sahasrabuddhe f8ba505a7c Merge branch 'master' into required-flags-take-2 2019-08-02 22:49:29 +05:30
Ajitem Sahasrabuddhe 656063a846 Merge pull request #788 from benzvan/master
adds test coverage to context
2019-08-02 22:49:09 +05:30
Lynn Cyrin 60fb297232 remove help assertion stuff 2019-08-01 23:27:38 -07:00
Lynn Cyrin d7ec4e8013 add env var tests 2019-08-01 23:27:38 -07:00
Lynn Cyrin f4128a02f3 Update command.go 2019-08-01 22:54:15 -07:00
Lynn Cyrin 38f9e1622d add environment variable support 🎉 2019-08-01 22:52:21 -07:00
Lynn Cyrin f21b22dd90 cleanup some issues with error display 2019-08-01 22:10:18 -07:00
Lynn Cyrin fdd4d10691 update comments 2019-08-01 21:48:52 -07:00
Lynn Cyrin ef9acb4a3b rename cases 2019-08-01 21:46:56 -07:00
Lynn Cyrin 45f2b3d8e7 more test cases 2019-08-01 21:45:11 -07:00
Lynn Cyrin 78db152323 add typed error assertions 2019-08-01 21:35:15 -07:00
Lynn Cyrin d4740d10d0 more test cases 2019-08-01 20:58:08 -07:00
Lynn Cyrin 595382c509 expand test cases 2019-08-01 20:39:37 -07:00
Lynn Cyrin 3d6eec825a add test cases 2019-08-01 20:35:23 -07:00
Lynn Cyrin 7b9e16b6b5 update test names 2019-08-01 20:30:43 -07:00
Lynn Cyrin 95d3a8624d update test to reflect app flag usage 2019-08-01 20:27:51 -07:00
Lynn Cyrin 714a73f028 remove unused thing 2019-08-01 19:57:14 -07:00
Lynn Cyrin 9438aba3b8 remove showFlagError, we can use the help printer assertion to accomplish the same goal 2019-08-01 19:54:57 -07:00
Lynn Cyrin 386b379d19 Revert "reset generated flags changes"
This reverts commit 9ec594d529.
2019-07-28 22:45:43 -07:00
Lynn Cyrin 9ec594d529 reset generated flags changes 2019-07-28 22:34:07 -07:00
Lynn Cyrin 23f09ac1e8 cleanup tests, check required flags in more places 2019-07-28 22:19:35 -07:00
Yogesh Lonkar d79d2a0424 Fix issue with source command completion
Avoid competion for bash builtin `source` and fallback to default implementation as it throws below error
```
-bash: source: --: invalid option
source: usage: source filename [arguments]
```
2019-07-24 16:08:47 +02:00
Lynn Cyrin 7ce0af189e remove unused code 2019-07-18 00:52:24 -07:00
Lynn Cyrin d8985dc6d5 reduce diff 2019-07-18 00:51:16 -07:00
Lynn Cyrin 19140e1fb5 show errors 2019-07-18 00:48:09 -07:00
Lynn Cyrin 2299852c3c cleanup subcommand and specs 2019-07-18 00:47:18 -07:00
Lynn Cyrin 300288670f add subcommand 2019-07-18 00:20:32 -07:00
Lynn Cyrin cc1cf8c459 wording shift 2019-07-18 00:14:03 -07:00
Lynn Cyrin 32d84d8e87 copy update 2019-07-17 00:25:13 -07:00
Lynn Cyrin 01d5cfab70 use strings.Join 2019-07-17 00:20:44 -07:00
Lynn Cyrin cdc7af744e add handling for multiple required flags 2019-07-17 00:16:40 -07:00
Lynn Cyrin 9293f5b3cc visually shorten logic 2019-07-14 21:00:16 -07:00
Lynn Cyrin f00f35ce8c docs 2019-07-13 14:02:45 -07:00
Lynn Cyrin 17108e1db4 tabs 2019-07-13 13:59:29 -07:00
Lynn Cyrin cf824804c2 update tests 2019-07-13 13:57:06 -07:00
Lynn Cyrin 80d7e91191 fill out test cases 2019-07-13 03:51:26 -07:00
Lynn Cyrin 746866c10d add update integration with the help output 2019-07-13 03:44:39 -07:00
Lynn Cyrin 550ed20ea4 update tests 2019-07-13 01:26:47 -07:00
Lynn Cyrin f6777bf4bf quote the flag name 2019-07-13 01:03:46 -07:00
Lynn Cyrin 6a2ae78373 backwards compatible RequiredFlag implementation 2019-07-11 21:53:10 -07:00
Lynn Cyrin 922d231891 ./generate-flag-types cli -i flag-types.json -o flag_generated.go 2019-07-11 21:28:09 -07:00
Lynn Cyrin 8a58b7e039 remove manual isRequired funcs 2019-07-11 20:47:47 -07:00
Lynn Cyrin 62e99ad1c1 add IsRequired to generator 2019-07-11 20:46:22 -07:00
Lynn Cyrin 310bfeb194 add required attr to generator 2019-07-11 20:44:41 -07:00