Skip to content

Commit

Permalink
fixup keystore.go after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
petar committed Aug 17, 2020
1 parent 7d9879f commit d901a5e
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions core/commands/keystore.go
Original file line number Diff line number Diff line change
Expand Up @@ -548,31 +548,6 @@ func verifyIDFormatLabel(formatLabel string) error {
}
}

func keyEncoderFromString(formatLabel string) (keyEncoder, error) {
switch formatLabel {
case "b58mh", "v0":
return keyEncoder{}, nil
default:
if enc, err := mbase.EncoderByName(formatLabel); err != nil {
return keyEncoder{}, err
} else {
return keyEncoder{&enc}, nil
}
}
}

func (enc keyEncoder) FormatID(id peer.ID) string {
if enc.baseEnc == nil {
//nolint deprecated
return peer.IDB58Encode(id)
}
if s, err := peer.ToCid(id).StringOfBase(enc.baseEnc.Encoding()); err != nil {
panic(err)
} else {
return s
}
}

func keyOutputListEncoders() cmds.EncoderFunc {
return cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, list *KeyOutputList) error {
withID, _ := req.Options["l"].(bool)
Expand Down

0 comments on commit d901a5e

Please sign in to comment.