[#1396] cli/playground: Refactor
All checks were successful
Tests and linters / Run gofumpt (pull_request) Successful in 1m45s
DCO action / DCO (pull_request) Successful in 2m0s
Vulncheck / Vulncheck (pull_request) Successful in 2m14s
Pre-commit hooks / Pre-commit (pull_request) Successful in 2m34s
Build / Build Components (pull_request) Successful in 2m52s
Tests and linters / Tests (pull_request) Successful in 3m8s
Tests and linters / gopls check (pull_request) Successful in 3m8s
Tests and linters / Staticcheck (pull_request) Successful in 3m20s
Tests and linters / Lint (pull_request) Successful in 3m52s
Tests and linters / Tests with -race (pull_request) Successful in 6m19s

Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
This commit is contained in:
Alexander Chuprov 2024-11-11 16:46:06 +03:00
parent 89ad4879f6
commit fbc4d8e221
Signed by: achuprov
GPG key ID: 2D916FFD803B0EDD

View file

@ -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)
}