Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Datree
Commits
e2e24dc0
Commit
e2e24dc0
authored
4 years ago
by
myishay
Browse files
Options
Download
Email Patches
Plain Diff
fix: clean evaluator
parent
2b937b53
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bl/evaluator.go
+0
-16
bl/evaluator.go
bl/osInfo.go
+18
-0
bl/osInfo.go
with
18 additions
and
16 deletions
+18
-16
bl/evaluator.go
+
0
-
16
View file @
e2e24dc0
...
...
@@ -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
,
...
...
This diff is collapsed.
Click to expand it.
bl/osInfo.go
0 → 100644
+
18
-
0
View file @
e2e24dc0
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
,
}
}
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help