From f56edde132d85c23e7c92f548011c485d55ad861 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Thu, 22 Jul 2021 15:36:32 -0700 Subject: [PATCH] fix: remove some deprecated calls --- core/commands/keyencode/keyencode.go | 3 +-- core/corehttp/logs.go | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/core/commands/keyencode/keyencode.go b/core/commands/keyencode/keyencode.go index 1db095d6d836..bdffac6ada31 100644 --- a/core/commands/keyencode/keyencode.go +++ b/core/commands/keyencode/keyencode.go @@ -29,8 +29,7 @@ func KeyEncoderFromString(formatLabel string) (KeyEncoder, error) { func (enc KeyEncoder) FormatID(id peer.ID) string { if enc.baseEnc == nil { - //nolint deprecated - return peer.IDB58Encode(id) + return peer.Encode(id) } if s, err := peer.ToCid(id).StringOfBase(enc.baseEnc.Encoding()); err != nil { panic(err) diff --git a/core/corehttp/logs.go b/core/corehttp/logs.go index 99e8fa8853b5..0d9cd1d76440 100644 --- a/core/corehttp/logs.go +++ b/core/corehttp/logs.go @@ -50,7 +50,7 @@ func LogOption() ServeOption { w.WriteHeader(200) wnf, errs := newWriteErrNotifier(w) lwriter.WriterGroup.AddWriter(wnf) - log.Event(n.Context(), "log API client connected") //nolint deprecated + log.Info("log API client connected") <-errs }) return mux, nil