浏览代码

use NewAuthenticationResponse instead of struct{}

V2Ray 10 年之前
父节点
当前提交
8f93612dec
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. 1 4
      io/socks/socks_test.go

+ 1 - 4
io/socks/socks_test.go

@@ -40,10 +40,7 @@ func TestAuthenticationRequestRead(t *testing.T) {
 func TestAuthenticationResponseWrite(t *testing.T) {
 func TestAuthenticationResponseWrite(t *testing.T) {
 	assert := unit.Assert(t)
 	assert := unit.Assert(t)
 
 
-	response := Socks5AuthenticationResponse{
-		version:    socksVersion,
-		authMethod: byte(0x05),
-	}
+	response := NewAuthenticationResponse(byte(0x05))
 
 
 	buffer := bytes.NewBuffer(make([]byte, 0, 10))
 	buffer := bytes.NewBuffer(make([]byte, 0, 10))
 	WriteAuthentication(buffer, &response)
 	WriteAuthentication(buffer, &response)