-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Labels
area/flags-argsChanges to functionality around command line flags and argsChanges to functionality around command line flags and argskind/featureA feature request for cobra; new or enhanced behaviorA feature request for cobra; new or enhanced behavior
Description
Hi,
Is there simple way to handle time flags? For example, I use the following flags in my cli:
./a.out --start="2018-09-08 12:00:00" --end="2018-09-09 12:00:00"
I have not found according functions in go doc, and use the following workaround: I save start/end values using StringVarP and then define layout and parse strings with time.Parse.
Does cobra provide functions for handling time flags?
benjaminch, natdm, lmolas, gianarb, fabiante and 26 more
Metadata
Metadata
Assignees
Labels
area/flags-argsChanges to functionality around command line flags and argsChanges to functionality around command line flags and argskind/featureA feature request for cobra; new or enhanced behaviorA feature request for cobra; new or enhanced behavior