[#1396] cli/playground: Refactor
All checks were successful
Tests and linters / Run gofumpt (pull_request) Successful in 1m38s
DCO action / DCO (pull_request) Successful in 1m52s
Vulncheck / Vulncheck (pull_request) Successful in 2m24s
Pre-commit hooks / Pre-commit (pull_request) Successful in 2m42s
Build / Build Components (pull_request) Successful in 2m49s
Tests and linters / gopls check (pull_request) Successful in 3m8s
Tests and linters / Staticcheck (pull_request) Successful in 3m13s
Tests and linters / Lint (pull_request) Successful in 4m0s
Tests and linters / Tests (pull_request) Successful in 4m46s
Tests and linters / Tests with -race (pull_request) Successful in 6m10s
All checks were successful
Tests and linters / Run gofumpt (pull_request) Successful in 1m38s
DCO action / DCO (pull_request) Successful in 1m52s
Vulncheck / Vulncheck (pull_request) Successful in 2m24s
Pre-commit hooks / Pre-commit (pull_request) Successful in 2m42s
Build / Build Components (pull_request) Successful in 2m49s
Tests and linters / gopls check (pull_request) Successful in 3m8s
Tests and linters / Staticcheck (pull_request) Successful in 3m13s
Tests and linters / Lint (pull_request) Successful in 4m0s
Tests and linters / Tests (pull_request) Successful in 4m46s
Tests and linters / Tests with -race (pull_request) Successful in 6m10s
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
This commit is contained in:
parent
2f3bc6eb84
commit
80f8a8fd3a
1 changed files with 2 additions and 3 deletions
|
@ -221,7 +221,7 @@ func (repl *policyPlaygroundREPL) run() error {
|
|||
exit = true
|
||||
continue
|
||||
}
|
||||
return fmt.Errorf("reading line: %v", err)
|
||||
return fmt.Errorf("reading line: %w", err)
|
||||
}
|
||||
exit = false
|
||||
|
||||
|
@ -230,8 +230,7 @@ func (repl *policyPlaygroundREPL) run() error {
|
|||
continue
|
||||
}
|
||||
cmd := parts[0]
|
||||
handler, exists := cmdHandlers[cmd]
|
||||
if exists {
|
||||
if handler, exists := cmdHandlers[cmd]; exists {
|
||||
if err := handler(parts[1:]); err != nil {
|
||||
fmt.Printf("error: %v\n", err)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue