Use positional arguments for source and target in beam commands

This commit is contained in:
Philipp Wolfer 2023-12-08 17:59:37 +01:00
parent 3ab0ce1cc6
commit 20f1732858
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B
4 changed files with 20 additions and 22 deletions

View file

@ -37,11 +37,7 @@ func init() {
// Cobra supports Persistent Flags which will work for this command
// and all subcommands, e.g.:
beamCmd.PersistentFlags().StringP("from", "f", "", "Source service configuration (required)")
beamCmd.MarkPersistentFlagRequired("from")
beamCmd.PersistentFlags().StringP("to", "t", "", "Target service configuration (required)")
beamCmd.MarkPersistentFlagRequired("to")
beamCmd.PersistentFlags().Int64P("timestamp", "s", 0, "Only import data newer then given Unix timestamp")
// beamCmd.PersistentFlags().String("foo", "", "A help for foo")
// Cobra supports local flags which will only run when this command
// is called directly, e.g.: