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:
parent
01dabe5966
commit
3b575e83f1
@ -679,7 +679,7 @@ fn expr_is_single_line(expr ast.Expr) bool {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
ast.StructInit {
|
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
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -132,7 +132,7 @@ pub fn (mut f Gen) struct_init(node ast.StructInit) {
|
|||||||
f.write('}')
|
f.write('}')
|
||||||
}
|
}
|
||||||
f.mark_import_as_used(name)
|
f.mark_import_as_used(name)
|
||||||
} else if node.is_short {
|
} else if node.no_keys {
|
||||||
// `Foo{1,2,3}` (short syntax )
|
// `Foo{1,2,3}` (short syntax )
|
||||||
f.write('$name{')
|
f.write('$name{')
|
||||||
f.mark_import_as_used(name)
|
f.mark_import_as_used(name)
|
||||||
|
Loading…
Reference in New Issue
Block a user