From f67d3ef80ca138a4d85e7cf14d02e73f41e329da Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Thu, 7 Jul 2022 12:13:52 +0000 Subject: [PATCH] remove peer.IDFromString --- peer/peer.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/peer/peer.go b/peer/peer.go index 7d4bdfff..470437e3 100644 --- a/peer/peer.go +++ b/peer/peer.go @@ -113,15 +113,6 @@ func (id ID) Validate() error { return nil } -// IDFromString casts a string to the ID type, and validates -// the value to make sure it is a multihash. -func IDFromString(s string) (ID, error) { - if _, err := mh.Cast([]byte(s)); err != nil { - return ID(""), err - } - return ID(s), nil -} - // IDFromBytes casts a byte slice to the ID type, and validates // the value to make sure it is a multihash. func IDFromBytes(b []byte) (ID, error) {