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
2d0c262b
Commit
2d0c262b
authored
3 years ago
by
Alex
Browse files
Options
Download
Email Patches
Plain Diff
refactor: group related lines together
parent
56fec4d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cmd/test/main.go
+10
-10
cmd/test/main.go
with
10 additions
and
10 deletions
+10
-10
cmd/test/main.go
+
10
-
10
View file @
2d0c262b
...
...
@@ -170,6 +170,16 @@ func test(ctx *TestCommandContext, paths []string, flags TestCommandFlags) error
paths
=
[]
string
{
tempFile
.
Name
()}
}
filesPaths
,
err
:=
ctx
.
Reader
.
FilterFiles
(
paths
)
if
err
!=
nil
{
return
err
}
filesPathsLen
:=
len
(
filesPaths
)
if
filesPathsLen
==
0
{
noFilesErr
:=
fmt
.
Errorf
(
"No files detected"
)
return
noFilesErr
}
if
flags
.
Output
==
"simple"
{
ctx
.
Printer
.
SetTheme
(
printer
.
CreateSimpleTheme
())
}
...
...
@@ -186,16 +196,6 @@ func test(ctx *TestCommandContext, paths []string, flags TestCommandFlags) error
}()
}
filesPaths
,
err
:=
ctx
.
Reader
.
FilterFiles
(
paths
)
if
err
!=
nil
{
return
err
}
filesPathsLen
:=
len
(
filesPaths
)
if
filesPathsLen
==
0
{
noFilesErr
:=
fmt
.
Errorf
(
"No files detected"
)
return
noFilesErr
}
var
_spinner
*
spinner
.
Spinner
if
isInteractiveMode
==
true
&&
flags
.
Output
!=
"simple"
{
_spinner
=
createSpinner
(
" Loading..."
,
"cyan"
)
...
...
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