Commit Graph

32 Commits

Author SHA1 Message Date
miyado
dd9cd61bef
Fix for TimestampFlag.GetValue to return empty string without value 2022-10-01 19:17:07 -04:00
Naveen Gogineni
268cb973f8 Remove all flag interfaces 2022-09-04 22:51:05 -04:00
Naveen Gogineni
ab68d8a69d Cleanup: Collapse flag interfaces 2022-09-04 22:18:41 -04:00
Balazs Nagy
1335a7022a accept timezone for timestamps 2022-07-09 13:52:55 +02:00
4bca72cea1
Merge remote-tracking branch 'origin/main' into michaeljs1990-add-flag-category-support 2022-05-22 11:06:38 -04:00
fc27cb08fc
Merge remote-tracking branch 'origin/main' into mostynb-report_source_of_parse_errors 2022-05-22 09:44:39 -04:00
a78717f4f9
Merge remote-tracking branch 'origin/main' into michaeljs1990-add-flag-category-support 2022-05-19 07:40:56 -04:00
bc9ad9fede
Generate RequiredFlag and VisibleFlag implementations 2022-05-08 13:52:32 -04:00
04f5ff0315
Merge branch 'main' into mostynb-report_source_of_parse_errors 2022-05-07 08:57:48 -04:00
ae97940956
Merge remote-tracking branch 'origin/main' into michaeljs1990-add-flag-category-support 2022-05-07 08:45:57 -04:00
ed0033984b
Generate flag types (again?)
Closes #1381
2022-05-01 23:02:05 -04:00
e7db6af492
Merge remote-tracking branch 'origin/main' into mostynb-report_source_of_parse_errors 2022-04-30 14:19:06 -04:00
a583a102fd
Merge remote-tracking branch 'origin/main' into michaeljs1990-add-flag-category-support 2022-04-28 20:29:09 -04:00
8cc43782ed
Merge branch 'main' into feature/1316-simplified_flag_value_access 2022-04-26 08:12:17 -04:00
Tilo Prütz
835bd32714 rename flags’ ValueFromContext() to Get() 2022-04-25 07:59:10 +02:00
9ce946162f
Unshadow context package
and consistently name `*cli.Context` vars and method receivers `cCtx`
2022-04-23 22:07:16 -04:00
75e4ee69e9
Porting remainder of #796 2022-04-22 15:01:40 -04:00
Tilo Prütz
889c7b5d7a TimestampFlag.ValueFromContext() as convenient accessor 2022-04-22 17:11:43 +02:00
826b3edd3f
Merge branch 'report_source_of_parse_errors' of ssh://github.com/mostynb/cli into mostynb-report_source_of_parse_errors 2022-04-19 19:41:57 -04:00
Naveen Gogineni
50c71ed517 Remove reflect calls for doc generation 2021-04-28 20:50:29 -04:00
Robert Liebowitz
e79ceb69ff
Merge pull request #1258 from dearchap/visible_interface
Fix(issue #631). Remove reflect calls for Hidden field
2021-04-24 13:10:52 -04:00
Robert Liebowitz
45eecb1d94
Merge pull request #1264 from dearchap/cleanup_context
Cleanup context.go
2021-04-24 12:02:16 -04:00
Naveen Gogineni
07e1fdf17d Cleanup context.go 2021-04-05 07:57:41 -04:00
Naveen Gogineni
df595c0d85 Fix(issue #631). Remove reflect calls for Hidden field 2021-03-25 20:45:30 -04:00
David Bond
f2bed637fd
Add Destination field to TimestampFlag
Adds a `Destination` field for the `TimestampFlag` type that allows you to specify a pointer to
a `Timestamp` rather than having to grab the `Timestamp` from the `cli.Context` using the flag
name.
2021-03-07 03:36:56 +00:00
Mostyn Bramley-Moore
cdc1f6e07c fixup! Report the source of a value when we cannot parse it
move bool to the end of the return arguments

remove "from " prefix in the source/fromWhere description

remove TODO notes from functions that don't currently perform error checking
2020-11-07 14:05:39 +01:00
Mostyn Bramley-Moore
500d6b04e6 Report the source of a value when we cannot parse it
If you allow a flag to be set from environment variables or files and
a parse error occurs from one of them, it is very useful for the error
message to mention where the value came from.

Without this, it can be difficult to notice an error caused by an
unexpected environment variable being set.

Implements #1167.
2020-11-03 23:57:00 +01:00
Vinicius Schettino
7ecfd216b1 Verify whether there is a Value before overriding 2020-07-11 15:54:46 -03:00
Dmitry Kutakov
8c28ae347a
refactor flag names - make it more explicitly
avoid the using 'reflect' package while getting flag names
2019-12-29 08:58:12 +01:00
Martin Lees
c62d7736ea fmt 2019-12-12 17:31:41 +01:00
Martin Lees
06eb576eaa Review fixes 2019-12-12 17:31:20 +01:00
Martin Lees
31c19a8ef3 timestamp flag 2019-12-09 11:50:47 +01:00