Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Commit

Permalink
define spin & exclude in function-level
Browse files Browse the repository at this point in the history
  • Loading branch information
dwisiswant0 committed Dec 3, 2022
1 parent 5ab5031 commit ab8c02c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions pkg/requests/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,21 @@ import (

var (
rsrc *resource.Resources
exclude bool
content []byte
errCon error
spin *spinner.Spinner
)

func init() {
spin = spinner.New(spinner.CharSets[11], 90*time.Millisecond, spinner.WithWriter(os.Stderr))
}

// Resources is to getting all available resources
func Resources(options *common.Options) {
rsrc = resource.Get()
getRules(options)
}

func getRules(options *common.Options) {
client := Client()
var spin = spinner.New(spinner.CharSets[11], 90*time.Millisecond, spinner.WithWriter(os.Stderr))
var exclude bool

client := Client()
rules := options.Configs.Rules
excludes := rules.Threat.Excludes
isCached := rules.Cache
Expand Down

0 comments on commit ab8c02c

Please sign in to comment.