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

vfmt: change all '$expr' to '${expr}' (#16428)

This commit is contained in:
yuyi
2022-11-15 21:53:13 +08:00
committed by GitHub
parent 56239b4a23
commit 017ace6ea7
859 changed files with 7156 additions and 7135 deletions

View File

@@ -77,7 +77,7 @@ fn (a Ip) str() string {
saddr := unsafe { cstring_to_vstring(&buf[0]) }
port := C.ntohs(a.port)
return '$saddr:$port'
return '${saddr}:${port}'
}
fn (a Ip6) str() string {
@@ -92,7 +92,7 @@ fn (a Ip6) str() string {
saddr := unsafe { cstring_to_vstring(&buf[0]) }
port := C.ntohs(a.port)
return '[$saddr]:$port'
return '[${saddr}]:${port}'
}
const aoffset = __offsetof(Addr, addr)
@@ -187,7 +187,7 @@ pub fn resolve_ipaddrs(addr string, family AddrFamily, typ SocketType) ![]Addr {
results := &C.addrinfo(0)
sport := '$port'
sport := '${port}'
// This might look silly but is recommended by MSDN
$if windows {
@@ -230,7 +230,7 @@ pub fn resolve_ipaddrs(addr string, family AddrFamily, typ SocketType) ![]Addr {
addresses << new_addr
}
else {
panic('Unexpected address family $result.ai_family')
panic('Unexpected address family ${result.ai_family}')
}
}
}