-
Notifications
You must be signed in to change notification settings - Fork 3.1k
time.Time flags #742
Copy link
Copy link
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
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
Hi,
Is there simple way to handle time flags? For example, I use the following flags in my cli:
I have not found according functions in go doc, and use the following workaround: I save start/end values using
StringVarPand then define layout and parse strings withtime.Parse.Does cobra provide functions for handling time flags?