chore: make go-lint happy (#405)

Signed-off-by: Peter Pan <Peter.Pan@daocloud.io>
This commit is contained in:
Peter Pan
2023-05-12 19:24:30 +08:00
committed by GitHub
parent 50916f2c93
commit ed73485d92
10 changed files with 17 additions and 16 deletions

View File

@@ -25,7 +25,7 @@ var FiltersCmd = &cobra.Command{
You can list available filters to analyze resources.`,
Run: func(cmd *cobra.Command, args []string) {
if len(args) == 0 {
cmd.Help()
_ = cmd.Help()
return
}
},

View File

@@ -37,7 +37,7 @@ var listCmd = &cobra.Command{
activeFilters = coreFilters
}
inactiveFilters := util.SliceDiff(availableFilters, activeFilters)
fmt.Printf(color.YellowString("Active: \n"))
fmt.Print(color.YellowString("Active: \n"))
for _, filter := range activeFilters {
// if the filter is an integration, mark this differently
@@ -50,7 +50,7 @@ var listCmd = &cobra.Command{
// display inactive filters
if len(inactiveFilters) != 0 {
fmt.Printf(color.YellowString("Unused: \n"))
fmt.Print(color.YellowString("Unused: \n"))
for _, filter := range inactiveFilters {
// if the filter is an integration, mark this differently
if util.SliceContainsString(integrationFilters, filter) {