Skip to content

Commit

Permalink
cleanup: moved targets
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Kotzbauer <[email protected]>
  • Loading branch information
ckotzbauer committed Jun 18, 2022
1 parent c6d5092 commit b9131b9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions internal/vuln/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import (
"github.com/ckotzbauer/vulnerability-operator/internal/vuln/source/git"
"github.com/ckotzbauer/vulnerability-operator/internal/vuln/source/kubernetes"
"github.com/ckotzbauer/vulnerability-operator/internal/vuln/target"
"github.com/ckotzbauer/vulnerability-operator/internal/vuln/target/json"
"github.com/ckotzbauer/vulnerability-operator/internal/vuln/target/metric"
"github.com/robfig/cron"
"github.com/sirupsen/logrus"
"github.com/spf13/viper"
Expand Down Expand Up @@ -145,9 +147,9 @@ func initTargets(targetKeys []string) []target.Target {

if ta == "json" {
reportsDir := viper.GetString(vuln.ConfigKeyReportsDir)
t = target.NewJsonTarget(reportsDir)
t = json.NewJsonTarget(reportsDir)
} else if ta == "metrics" {
t = target.NewMetricTarget()
t = metric.NewMetricTarget()
} else {
logrus.Fatalf("Unknown target %s", ta)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package target
package json

import (
"encoding/json"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package target
package metric

import (
"github.com/ckotzbauer/vulnerability-operator/internal/vuln/grype"
Expand Down

0 comments on commit b9131b9

Please sign in to comment.