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

http: refactor and reduce duplication

This commit is contained in:
Chris Watson
2020-01-16 10:16:11 -07:00
committed by Alexander Medvednikov
parent 756c6d2858
commit 84a6c019e8
8 changed files with 274 additions and 88 deletions

View File

@ -2,16 +2,11 @@ module main
import net.ftp
fn test_ftp_client() {
make_client_connection()
assert true
}
// NB: this function makes network calls to external servers,
// that is why it is not a very good idea to run it in CI.
// If you want to run it manually, use `v -d network vlib/net/ftp/ftp_test.v`
[if network]
fn make_client_connection() {
fn test_ftp_client() {
// $if !network ? { return }
mut ftp := ftp.new()
defer {
ftp.close()