From 2760325731cbe63ede77fdce528882ffd37cdd98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Mengu=C3=A9?= Date: Wed, 12 Jul 2023 23:07:45 +0200 Subject: [PATCH] go: use standard header in generated file Use the standard header for Go generated files, following the spec at https://golang.org/s/generatedcode. The template go/dialects_builtin.go.jq is fixed and go/dialects_builtin.go is regenerated. --- go/dialects_builtin.go | 2 ++ go/dialects_builtin.go.jq | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/go/dialects_builtin.go b/go/dialects_builtin.go index 2362612d8..c192253e6 100644 --- a/go/dialects_builtin.go +++ b/go/dialects_builtin.go @@ -1,3 +1,5 @@ +// Code generated from dialects_builtin.go.jq (make dialects_builtin.go); DO NOT EDIT. + package gherkin import messages "github.com/cucumber/messages/go/v21" diff --git a/go/dialects_builtin.go.jq b/go/dialects_builtin.go.jq index 72ef6170f..698d38432 100644 --- a/go/dialects_builtin.go.jq +++ b/go/dialects_builtin.go.jq @@ -86,7 +86,8 @@ ] | add ) -| "package gherkin\n\n" +| "// Code generated from dialects_builtin.go.jq (make dialects_builtin.go); DO NOT EDIT.\n\n" # Standard header defined at https://golang.org/s/generatedcode ++ "package gherkin\n\n" + "import messages \"github.com/cucumber/messages/go/v21\"\n\n" + "// Builtin dialects for " + ([ $root | to_entries[] | .key+" ("+.value.name+")" ] | join(", ")) + "\n" + "func DialectsBuiltin() DialectProvider {\n"