Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

Commit

Permalink
remove peer.IDFromString (#274)
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann authored Jul 9, 2022
1 parent 2dc986f commit 247031f
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions peer/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,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) {
Expand Down

0 comments on commit 247031f

Please sign in to comment.