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

@ -6,7 +6,7 @@ import net.http
// Parsing function attributes for methods and path.
fn parse_attrs(name string, attrs []string) !([]http.Method, string) {
if attrs.len == 0 {
return [http.Method.get], '/$name'
return [http.Method.get], '/${name}'
}
mut x := attrs.clone()
@ -41,7 +41,7 @@ fn parse_attrs(name string, attrs []string) !([]http.Method, string) {
methods = [http.Method.get]
}
if path == '' {
path = '/$name'
path = '/${name}'
}
// Make path lowercase for case-insensitive comparisons
return methods, path.to_lower()