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

doc, fmt: use map{key: value} syntax for map literals (#8623)

This commit is contained in:
Nick Treleaven
2021-02-08 14:57:42 +00:00
committed by GitHub
parent 8ae23cd89e
commit 9e751f72c4
15 changed files with 81 additions and 69 deletions

View File

@ -208,7 +208,7 @@ fn testsuite_end() {
// It sends a request to the server to shutdown.
x := http.fetch('http://127.0.0.1:$sport/shutdown',
method: .get
cookies: {
cookies: map{
'skey': 'superman'
}
) or {

View File

@ -19,7 +19,7 @@ pub const (
headers_close = '$header_server$header_connection_close\r\n'
http_404 = 'HTTP/1.1 404 Not Found\r\nContent-Type: text/plain\r\nContent-Length: 13\r\n${headers_close}404 Not Found'
http_500 = 'HTTP/1.1 500 Internal Server Error\r\nContent-Type: text/plain\r\n${headers_close}500 Internal Server Error'
mime_types = {
mime_types = map{
'.css': 'text/css; charset=utf-8'
'.gif': 'image/gif'
'.htm': 'text/html; charset=utf-8'