Skip to content

Commit

Permalink
refactor: avoid ineffassign
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickMenoti committed Jul 12, 2024
1 parent 7580f36 commit 7b7784d
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pkg/cmd/list/cache_setting/cache_setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func PrintTable(cmd *cobra.Command, f *cmdutil.Factory, opts *contracts.ListOpti
}

for _, v := range cache.Results {
ln := []string{}
var ln []string
if opts.Details {
ln = []string{
fmt.Sprintf("%d", v.Id),
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/list/domain/domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func PrintTable(cmd *cobra.Command, f *cmdutil.Factory, opts *contracts.ListOpti
}

for _, v := range resp.Results {
ln := []string{}
var ln []string
if opts.Details {
ln = []string{
fmt.Sprintf("%d", v.GetId()),
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/list/edge_applications/edge_applications.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func PrintTable(cmd *cobra.Command, client *api.Client, f *cmdutil.Factory, opts
}

for _, v := range resp.Results {
ln := []string{}
var ln []string
if opts.Details {
ln = []string{
fmt.Sprintf("%d", v.Id),
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/list/edge_function/edge_function.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func PrintTable(cmd *cobra.Command, f *cmdutil.Factory, opts *contracts.ListOpti
}

for _, v := range functions.Results {
ln := []string{}
var ln []string
if opts.Details {
ln = []string{
fmt.Sprintf("%d", v.GetId()),
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/list/edge_storage/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (b *Objects) PrintTable(client *api.Client) error {
}

for _, v := range resp.Results {
ln := []string{}
var ln []string
if b.Options.Details {
ln = []string{
v.GetKey(),
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/list/origin/origin.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func PrintTable(client *api.Client, f *cmdutil.Factory, opts *contracts.ListOpti
}

for _, v := range resp.Results {
ln := []string{}
var ln []string
if opts.Details {
ln = []string{
*v.OriginKey,
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/list/personal_token/personal_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func PrintTable(client *api.Client, f *cmdutil.Factory, details bool) error {

for _, v := range resp {

ln := []string{}
var ln []string
if details {
var description string
if v.Description.Get() != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/list/rule_engine/rule_engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func PrintTable(cmd *cobra.Command, f *cmdutil.Factory, opts *contracts.ListOpti
}

for _, v := range rules.Results {
ln := []string{}
var ln []string
if opts.Details {
ln = []string{
fmt.Sprintf("%d", v.Id),
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/list/variables/variables.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func listAllVariables(client *api.Client, f *cmdutil.Factory, opts *contracts.Li
}

for _, v := range resp {
ln := []string{}
var ln []string
if opts.Details {
ln = []string{
v.GetUuid(),
Expand Down

0 comments on commit 7b7784d

Please sign in to comment.