Commit e2e24dc0 authored by myishay's avatar myishay
Browse files

fix: clean evaluator

parent 2b937b53
Showing with 18 additions and 16 deletions
+18 -16
......@@ -9,7 +9,6 @@ import (
"github.com/datreeio/datree/pkg/cliClient"
"github.com/datreeio/datree/pkg/printer"
"github.com/datreeio/datree/pkg/propertiesExtractor"
"github.com/shirou/gopsutil/host"
"gopkg.in/yaml.v3"
)
......@@ -31,21 +30,6 @@ type Evaluator struct {
osInfo *OSInfo
}
type OSInfo struct {
OS string
PlatformVersion string
KernelVersion string
}
func createOSInfo() *OSInfo {
infoStat, _ := host.Info()
return &OSInfo{
OS: infoStat.OS,
KernelVersion: infoStat.KernelVersion,
PlatformVersion: infoStat.PlatformVersion,
}
}
func CreateNewEvaluator(pe PropertiesExtractor, c CLIClient, p Printer) *Evaluator {
return &Evaluator{
propertiesExtractor: pe,
......
package bl
import "github.com/shirou/gopsutil/host"
type OSInfo struct {
OS string
PlatformVersion string
KernelVersion string
}
func createOSInfo() *OSInfo {
infoStat, _ := host.Info()
return &OSInfo{
OS: infoStat.OS,
KernelVersion: infoStat.KernelVersion,
PlatformVersion: infoStat.PlatformVersion,
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment