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:
@ -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())
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user