From 2e1c2b95e056eb0a6ce0cb603c448c9948906892 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Wed, 7 Dec 2016 13:13:48 +0100 Subject: [PATCH] comments --- common/protocol/id.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/common/protocol/id.go b/common/protocol/id.go index c50c631e..51d30df4 100644 --- a/common/protocol/id.go +++ b/common/protocol/id.go @@ -5,7 +5,6 @@ import ( "crypto/md5" "hash" - "v2ray.com/core/common/errors" "v2ray.com/core/common/uuid" ) @@ -13,10 +12,6 @@ const ( IDBytesLen = 16 ) -var ( - InvalidID = errors.New("Invalid ID.") -) - type IDHash func(key []byte) hash.Hash func DefaultIDHash(key []byte) hash.Hash { @@ -29,6 +24,7 @@ type ID struct { cmdKey [IDBytesLen]byte } +// Equals returns true if this ID equals to the other one. func (v *ID) Equals(another *ID) bool { return v.uuid.Equals(another.uuid) }