From 3b575e83f1e6f7ff58fd02b265380e9fed285558 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sun, 10 Jul 2022 18:53:18 +0300 Subject: [PATCH] ci: fix ./v cmd/tools/builders/golang_builder.v --- vlib/v/gen/golang/golang.v | 2 +- vlib/v/gen/golang/struct.v | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vlib/v/gen/golang/golang.v b/vlib/v/gen/golang/golang.v index 3bec5f910a..ee30937c1e 100644 --- a/vlib/v/gen/golang/golang.v +++ b/vlib/v/gen/golang/golang.v @@ -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 } } diff --git a/vlib/v/gen/golang/struct.v b/vlib/v/gen/golang/struct.v index 7b35c4c0fb..d5908ce88e 100644 --- a/vlib/v/gen/golang/struct.v +++ b/vlib/v/gen/golang/struct.v @@ -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)