Refactor vmess internal struct for better readability

This commit is contained in:
V2Ray committed 2015-09-11 17:27:36 +02:00
1 parent 8a6b07ba61
commit 791ac780f0
7 files changed
+147 -229

No files matched your search

+3 -2
View File
@@ -3,7 +3,8 @@ package core
import (
"crypto/md5"
"encoding/hex"
"fmt"
"github.com/v2ray/v2ray-core/log"
)
// The ID of en entity, in the form of an UUID.
@@ -23,7 +24,7 @@ var byteGroups = []int{8, 4, 4, 4, 12}
func UUIDToVID(uuid string) (v VID, err error) {
text := []byte(uuid)
if len(text) < 32 {
err = fmt.Errorf("uuid: invalid UUID string: %s", text)
err = log.Error("uuid: invalid UUID string: %s", text)
return
}