Skip to content

Commit 0371f22

Browse files
committed
removed operationState variable
1 parent 3c9e03f commit 0371f22

File tree

4 files changed

+4
-11
lines changed

4 files changed

+4
-11
lines changed

internal/cmd/beta/logs/access_token/delete/delete.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
7878
return fmt.Errorf("delete access token: %w", err)
7979
}
8080

81-
operationState := "Deleted"
82-
params.Printer.Outputf("%s access token %q\n", operationState, accessTokenLabel)
81+
params.Printer.Outputf("Deleted access token %q\n", accessTokenLabel)
8382
return nil
8483
},
8584
}

internal/cmd/beta/logs/access_token/delete_all/delete_all.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
7272
return fmt.Errorf("delete access token: %w", err)
7373
}
7474

75-
operationState := "Deleted"
76-
params.Printer.Outputf("%s %d access token(s)\n", operationState, len(*items.Tokens))
75+
params.Printer.Outputf("Deleted %d access token(s)\n", len(*items.Tokens))
7776
return nil
7877
},
7978
}

internal/cmd/beta/logs/access_token/delete_all_expired/delete_all_expired.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
7272
return fmt.Errorf("delete access token: %w", err)
7373
}
7474

75-
operationState := "Deleted"
76-
params.Printer.Outputf("%s %d expired access token(s)\n", operationState, len(*items.Tokens))
75+
params.Printer.Outputf("Deleted %d expired access token(s)\n", len(*items.Tokens))
7776
return nil
7877
},
7978
}

internal/cmd/beta/logs/access_token/update/update.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,7 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
9595
return fmt.Errorf("update access token: %w", err)
9696
}
9797

98-
operationState := "Updated"
99-
if model.Async {
100-
operationState = "Triggered update of"
101-
}
102-
params.Printer.Outputf("%s access token %q\n", operationState, accessTokenLabel)
98+
params.Printer.Outputf("Updated access token %q\n", accessTokenLabel)
10399
return nil
104100
},
105101
}

0 commit comments

Comments
 (0)