[#9999] cli: Replace deprecated methods
Some checks failed
DCO action / DCO (pull_request) Successful in 56s
Tests and linters / Run gofumpt (pull_request) Successful in 1m21s
Vulncheck / Vulncheck (pull_request) Successful in 1m53s
Pre-commit hooks / Pre-commit (pull_request) Successful in 2m22s
Build / Build Components (pull_request) Successful in 2m30s
Tests and linters / Staticcheck (pull_request) Successful in 2m41s
Tests and linters / gopls check (pull_request) Successful in 2m54s
Tests and linters / Tests (pull_request) Successful in 4m15s
Tests and linters / Tests with -race (pull_request) Successful in 5m52s
Tests and linters / Lint (pull_request) Failing after 2m31s

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 2b5d0c8eff
commit c4322a6943

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"
} }