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

ci: fix ./v cmd/tools/builders/golang_builder.v

This commit is contained in:
Delyan Angelov 2022-07-10 18:53:18 +03:00
parent 01dabe5966
commit 3b575e83f1
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
2 changed files with 2 additions and 2 deletions

View File

@ -679,7 +679,7 @@ fn expr_is_single_line(expr ast.Expr) bool {
}
}
ast.StructInit {
if !expr.is_short && (expr.fields.len > 0 || expr.pre_comments.len > 0) {
if !expr.no_keys && (expr.fields.len > 0 || expr.pre_comments.len > 0) {
return false
}
}

View File

@ -132,7 +132,7 @@ pub fn (mut f Gen) struct_init(node ast.StructInit) {
f.write('}')
}
f.mark_import_as_used(name)
} else if node.is_short {
} else if node.no_keys {
// `Foo{1,2,3}` (short syntax )
f.write('$name{')
f.mark_import_as_used(name)