1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

check unused and unmodified vars in all modules, not just main

This commit is contained in:
Alexander Medvednikov
2019-12-06 15:24:53 +03:00
parent bdaa421e8a
commit c8d111924d
31 changed files with 133 additions and 119 deletions

View File

@ -84,7 +84,7 @@ fn (req &Request) ssl_do(port int, method, host_name, path string) ?Response {
res = C.SSL_set_tlsext_host_name(ssl, host_name.str)
res = C.BIO_do_connect(web)
res = C.BIO_do_handshake(web)
cert := C.SSL_get_peer_certificate(ssl)
C.SSL_get_peer_certificate(ssl)
res = C.SSL_get_verify_result(ssl)
///////
s := req.build_request_headers(method, host_name, path)

View File

@ -137,8 +137,8 @@ pub fn (req &Request) do() ?Response {
fn (req &Request) method_and_url_to_response(method string, url net_dot_urllib.URL) ?Response {
host_name := url.hostname()
scheme := url.scheme
mut p := url.path.trim_left('/')
mut path := if url.query().size > 0 { '/$p?${url.query().encode()}' } else { '/$p' }
p := url.path.trim_left('/')
path := if url.query().size > 0 { '/$p?${url.query().encode()}' } else { '/$p' }
mut nport := url.port().int()
if nport == 0 {
if scheme == 'http' { nport = 80 }