Skip to content

Commit

Permalink
refactor: remove unused context
Browse files Browse the repository at this point in the history
Signed-off-by: knqyf263 <knqyf263@gmail.com>
  • Loading branch information
knqyf263 committed Jan 3, 2024
1 parent b8d060a commit 168b6ca
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions pkg/k8s/report/table.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package report

import (
"context"
"io"
"sync"

Expand Down Expand Up @@ -44,7 +43,7 @@ func InfraColumns() []string {
return []string{InfraAssessmentColumn}
}

func (tw TableWriter) Write(ctx context.Context, report Report) error {
func (tw TableWriter) Write(report Report) error {
switch tw.Report {
case AllReport:
t := pkgReport.Writer{
Expand All @@ -54,7 +53,7 @@ func (tw TableWriter) Write(ctx context.Context, report Report) error {
}
for _, r := range report.Resources {
if r.Report.Results.Failed() {
err := t.Write(ctx, r.Report)
err := t.Write(r.Report)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/k8s/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func Write(ctx context.Context, k8sreport report.Report, option report.Option) e
ColumnHeading: report.ColumnHeading(option.Scanners, option.Components, r.Columns),
}

if err := writer.Write(ctx, r.Report); err != nil {
if err := writer.Write(r.Report); err != nil {
return err
}
}
Expand Down
3 changes: 1 addition & 2 deletions pkg/report/table/table.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package table

import (
"context"
"fmt"
"io"
"os"
Expand Down Expand Up @@ -53,7 +52,7 @@ type Renderer interface {
}

// Write writes the result on standard output
func (tw Writer) Write(ctx context.Context, report types.Report) error {
func (tw Writer) Write(report types.Report) error {
for _, result := range report.Results {
// Not display a table of custom resources
if result.Class == types.ClassCustom {
Expand Down

0 comments on commit 168b6ca

Please sign in to comment.