[#1236] cli: Fix netinfo output for empty unknown parameters
All checks were successful
Vulncheck / Vulncheck (pull_request) Successful in 3m18s
DCO action / DCO (pull_request) Successful in 3m20s
Build / Build Components (1.21) (pull_request) Successful in 5m0s
Build / Build Components (1.22) (pull_request) Successful in 5m0s
Pre-commit hooks / Pre-commit (pull_request) Successful in 6m19s
Tests and linters / Staticcheck (pull_request) Successful in 6m46s
Tests and linters / gopls check (pull_request) Successful in 6m45s
Tests and linters / Lint (pull_request) Successful in 7m39s
Tests and linters / Tests (1.21) (pull_request) Successful in 9m2s
Tests and linters / Tests (1.22) (pull_request) Successful in 9m3s
Tests and linters / Tests with -race (pull_request) Successful in 10m28s
All checks were successful
Vulncheck / Vulncheck (pull_request) Successful in 3m18s
DCO action / DCO (pull_request) Successful in 3m20s
Build / Build Components (1.21) (pull_request) Successful in 5m0s
Build / Build Components (1.22) (pull_request) Successful in 5m0s
Pre-commit hooks / Pre-commit (pull_request) Successful in 6m19s
Tests and linters / Staticcheck (pull_request) Successful in 6m46s
Tests and linters / gopls check (pull_request) Successful in 6m45s
Tests and linters / Lint (pull_request) Successful in 7m39s
Tests and linters / Tests (1.21) (pull_request) Successful in 9m2s
Tests and linters / Tests (1.22) (pull_request) Successful in 9m3s
Tests and linters / Tests with -race (pull_request) Successful in 10m28s
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
This commit is contained in:
parent
8eb591d668
commit
afeaf01cea
1 changed files with 6 additions and 2 deletions
|
@ -50,8 +50,12 @@ var netInfoCmd = &cobra.Command{
|
||||||
cmd.Printf(format, "Maintenance mode allowed", netInfo.MaintenanceModeAllowed())
|
cmd.Printf(format, "Maintenance mode allowed", netInfo.MaintenanceModeAllowed())
|
||||||
|
|
||||||
cmd.Println("FrostFS network configuration (other)")
|
cmd.Println("FrostFS network configuration (other)")
|
||||||
netInfo.IterateRawNetworkParameters(func(name string, value []byte) {
|
netInfo.IterateRawNetworkParameters(func(name string, rawValue []byte) {
|
||||||
cmd.Printf(format, name, hex.EncodeToString(value))
|
value := hex.EncodeToString(rawValue)
|
||||||
|
if value == "" {
|
||||||
|
value = `""`
|
||||||
|
}
|
||||||
|
cmd.Printf(format, name, value)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue