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

fmt: remove space in front of ? and ! (#14366)

This commit is contained in:
Daniel Däschle
2022-05-13 05:56:21 +02:00
committed by GitHub
parent df029da942
commit d679146a80
324 changed files with 1865 additions and 1879 deletions

View File

@ -12,7 +12,7 @@ fn main() {
mut buf := []u8{len: 100}
if is_server {
println('UDP echo server, listening for udp packets on port: $port')
mut c := net.listen_udp(':$port') ?
mut c := net.listen_udp(':$port')?
for {
read, addr := c.read(mut buf) or { continue }
println('received $read bytes from $addr')
@ -23,7 +23,7 @@ fn main() {
}
} else {
println('UDP client, sending packets to port: ${port}.\nType `exit` to exit.')
mut c := net.dial_udp('localhost:$port') ?
mut c := net.dial_udp('localhost:$port')?
for {
mut line := os.input('client > ')
match line {
@ -36,8 +36,8 @@ fn main() {
}
else {}
}
c.write_string(line) ?
read, _ := c.read(mut buf) ?
c.write_string(line)?
read, _ := c.read(mut buf)?
println('server : ' + buf[0..read].bytestr())
}
}