Improve: gofmt -s for shadowsocks.go

This commit is contained in:
gVisor bot 2018-06-22 23:56:41 +08:00
parent fbd5dfd3b5
commit 4490f81d11

View File

@ -93,13 +93,13 @@ func serializesSocksAddr(addr *C.Addr) []byte {
case socks.AtypDomainName:
len := uint8(len(addr.Host))
host := []byte(addr.Host)
buf = [][]byte{[]byte{aType, len}, host, port}
buf = [][]byte{{aType, len}, host, port}
case socks.AtypIPv4:
host := addr.IP.To4()
buf = [][]byte{[]byte{aType}, host, port}
buf = [][]byte{{aType}, host, port}
case socks.AtypIPv6:
host := addr.IP.To16()
buf = [][]byte{[]byte{aType}, host, port}
buf = [][]byte{{aType}, host, port}
}
return bytes.Join(buf, []byte(""))
}