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

os.File clean up + socket.v (dial())

This commit is contained in:
Alexander Medvednikov
2019-06-30 16:11:55 +02:00
parent 386367c3d5
commit 61b51f6149
6 changed files with 94 additions and 9 deletions

View File

@@ -68,7 +68,7 @@ fn (g mut CGen) gen(s string) {
fn (g mut CGen) save() {
s := g.lines.join('\n')
g.out.appendln(s)
g.out.writeln(s)
g.out.close()
}

View File

@@ -823,7 +823,6 @@ fn new_v(args []string) *V {
files << f
}
}
obfuscate := args.contains('-obf')
return &V {
os: _os
out_name: out_name
@@ -839,7 +838,7 @@ fn new_v(args []string) *V {
is_play: args.contains('play')
is_prod: args.contains('-prod')
is_verbose: args.contains('-verbose')
obfuscate: obfuscate
obfuscate: args.contains('-obf')
is_prof: args.contains('-prof')
is_live: args.contains('-live')
sanitize: args.contains('-sanitize')

View File

@@ -236,7 +236,7 @@ fn (p mut Parser) parse() {
}
if true && !p.first_run() && p.fileis('test') {
out := os.create('/var/tmp/fmt.v')
out.appendln(p.scanner.fmt_out.str())
out.writeln(p.scanner.fmt_out.str())
out.close()
}
return