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

remove peer.IDFromString #274

Merged
merged 1 commit into from
Jul 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions peer/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down