Explorar o código

use NewAuthenticationResponse instead of struct{}

V2Ray %!s(int64=10) %!d(string=hai) anos
pai
achega
8f93612dec
Modificáronse 1 ficheiros con 1 adicións e 4 borrados
  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) {
 	assert := unit.Assert(t)
 
-	response := Socks5AuthenticationResponse{
-		version:    socksVersion,
-		authMethod: byte(0x05),
-	}
+	response := NewAuthenticationResponse(byte(0x05))
 
 	buffer := bytes.NewBuffer(make([]byte, 0, 10))
 	WriteAuthentication(buffer, &response)