forked from TrueCloudLab/frostfs-node
[#1236] cli: Fix netinfo output for empty unknown parameters
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.Println("FrostFS network configuration (other)")
|
||||
netInfo.IterateRawNetworkParameters(func(name string, value []byte) {
|
||||
cmd.Printf(format, name, hex.EncodeToString(value))
|
||||
netInfo.IterateRawNetworkParameters(func(name string, rawValue []byte) {
|
||||
value := hex.EncodeToString(rawValue)
|
||||
if value == "" {
|
||||
value = `""`
|
||||
}
|
||||
cmd.Printf(format, name, value)
|
||||
})
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue