[#1382] cli: Replace deprecated methods

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2024-09-18 12:27:39 +03:00
parent ac1eee091d
commit 3441fff05d

View file

@ -49,14 +49,14 @@ func prettyPrintNodeInfo(cmd *cobra.Command, i netmap.NodeInfo) {
cmd.Println("key:", hex.EncodeToString(i.PublicKey())) cmd.Println("key:", hex.EncodeToString(i.PublicKey()))
var stateWord string var stateWord string
switch { switch i.Status() {
default: default:
stateWord = "<undefined>" stateWord = "<undefined>"
case i.IsOnline(): case netmap.Online:
stateWord = "online" stateWord = "online"
case i.IsOffline(): case netmap.Offline:
stateWord = "offline" stateWord = "offline"
case i.IsMaintenance(): case netmap.Maintenance:
stateWord = "maintenance" stateWord = "maintenance"
} }