forked from TrueCloudLab/frostfs-node
[#1396] cli/playground: Refactor
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
|
exit = true
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
return fmt.Errorf("reading line: %v", err)
|
return fmt.Errorf("reading line: %w", err)
|
||||||
}
|
}
|
||||||
exit = false
|
exit = false
|
||||||
|
|
||||||
|
@ -230,8 +230,7 @@ func (repl *policyPlaygroundREPL) run() error {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
cmd := parts[0]
|
cmd := parts[0]
|
||||||
handler, exists := cmdHandlers[cmd]
|
if handler, exists := cmdHandlers[cmd]; exists {
|
||||||
if exists {
|
|
||||||
if err := handler(parts[1:]); err != nil {
|
if err := handler(parts[1:]); err != nil {
|
||||||
fmt.Printf("error: %v\n", err)
|
fmt.Printf("error: %v\n", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue