Skip to content

Commit

Permalink
Change name of field
Browse files Browse the repository at this point in the history
  • Loading branch information
marcinlawnik committed Oct 9, 2024
1 parent 802b3ae commit 306002f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/replay.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type ReplayCmd struct {
configPaths []string
sloName string
project string
all bool
deleteAll bool
}

//go:embed replay_example.sh
Expand Down
6 changes: 3 additions & 3 deletions internal/replay_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func (r *ReplayCmd) AddDeleteCommand() *cobra.Command {
if r.project != "" {
r.client.Config.Project = r.project
}
if r.all {
if r.deleteAll {
return r.deleteAllReplays(cmd)
} else {
return r.deleteReplaysForSLO(cmd, r.sloName)
Expand All @@ -28,13 +28,13 @@ func (r *ReplayCmd) AddDeleteCommand() *cobra.Command {

cmd.Flags().StringVarP(&r.project, "project", "p", "",
`Specifies the Project of the SLO you want to remove queued Replays for.`)
cmd.Flags().BoolVar(&r.all, "all", false, "Delete ALL queued Replays.")
cmd.Flags().BoolVar(&r.deleteAll, "all", false, "Delete ALL queued Replays.")

return cmd
}

func (r *ReplayCmd) deleteArguments(cmd *cobra.Command, args []string) error {
if !r.all && len(args) == 0 {
if !r.deleteAll && len(args) == 0 {
_ = cmd.Usage()
return errReplayDeleteInvalidOptions
}
Expand Down

0 comments on commit 306002f

Please sign in to comment.