mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-06-21 10:19:54 -04:00
use uuid as struct
This commit is contained in:
@@ -22,8 +22,9 @@ func TestRequestSerialization(t *testing.T) {
|
||||
Level: 0,
|
||||
Email: "test@v2ray.com",
|
||||
}
|
||||
id := uuid.New()
|
||||
account := &vmess.Account{
|
||||
Id: uuid.New().String(),
|
||||
Id: id.String(),
|
||||
AlterId: 0,
|
||||
}
|
||||
user.Account = serial.ToTypedMessage(account)
|
||||
|
||||
@@ -53,8 +53,9 @@ func (v *userByEmail) Get(email string) (*protocol.User, bool) {
|
||||
v.Lock()
|
||||
user, found = v.cache[email]
|
||||
if !found {
|
||||
id := uuid.New()
|
||||
account := &vmess.Account{
|
||||
Id: uuid.New().String(),
|
||||
Id: id.String(),
|
||||
AlterId: uint32(v.defaultAlterIDs),
|
||||
}
|
||||
user = &protocol.User{
|
||||
|
||||
Reference in New Issue
Block a user