887
//
888
// The from-visibility and stdin modes default to a dry-run; pass --execute to perform the migration.
889
>
func AdminMigrateSchedule(c *cli.Context, clientFactory ClientFactory) error {
commands.go
890
>
target, targetStr, err := parseMigrateTarget(c)
891
>
if err != nil {
892
return err
893
}
894
895
>
fromVisibility := c.Bool(FlagFromVisibility)
commands.go
896
>
scheduleID := c.String(FlagScheduleID)
897
>
898
>
// --query only takes effect in --from-visibility mode; reject it elsewhere rather than
899
>
// silently ignoring it.
900
>
if !fromVisibility && c.IsSet(FlagVisibilityQuery) {
901
return fmt.Errorf("--%s is only valid with --%s", FlagVisibilityQuery, FlagFromVisibility)
902
}