From 72effa8b31b41969b460001fd8ece577dddd7b75 Mon Sep 17 00:00:00 2001 From: iamrajiv Date: Mon, 16 Jun 2025 20:05:48 +0530 Subject: [PATCH 1/3] add go gen Signed-off-by: iamrajiv --- Makefile | 2 +- generate.go | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 generate.go diff --git a/Makefile b/Makefile index ffe4064..54bfa1c 100644 --- a/Makefile +++ b/Makefile @@ -64,7 +64,7 @@ lint: ## Lint the code .PHONY: generate # Regenerate code generate: - ./hack/generate.sh + go generate ./... .PHONY: all all: fmt test lint generate diff --git a/generate.go b/generate.go new file mode 100644 index 0000000..92ce937 --- /dev/null +++ b/generate.go @@ -0,0 +1,26 @@ +//go:build ignore + +/* +Copyright 2025 The CDEvents Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +SPDX-License-Identifier: Apache-2.0 +*/ + +// This file contains go:generate directives for code generation. +// Run `go generate` from the project root to regenerate all code. + +package main + +//go:generate go run tools/generator.go --resources . From 1d3f0b930fffed1492a72e42356b111f11d7b39e Mon Sep 17 00:00:00 2001 From: iamrajiv Date: Mon, 16 Jun 2025 20:06:10 +0530 Subject: [PATCH 2/3] add go gen Signed-off-by: iamrajiv --- pkg/api/bindings.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/api/bindings.go b/pkg/api/bindings.go index 95738b2..f81fe5c 100644 --- a/pkg/api/bindings.go +++ b/pkg/api/bindings.go @@ -16,6 +16,8 @@ limitations under the License. SPDX-License-Identifier: Apache-2.0 */ +//go:generate go run ../../tools/generator.go --resources ../.. + package api import ( From 7c0c0254c35dfcbfe1ba51c60ba41b52baa62808 Mon Sep 17 00:00:00 2001 From: iamrajiv Date: Mon, 16 Jun 2025 20:08:48 +0530 Subject: [PATCH 3/3] add go gen Signed-off-by: iamrajiv --- generate.go | 2 -- pkg/api/bindings.go | 2 -- 2 files changed, 4 deletions(-) diff --git a/generate.go b/generate.go index 92ce937..d14612a 100644 --- a/generate.go +++ b/generate.go @@ -1,5 +1,3 @@ -//go:build ignore - /* Copyright 2025 The CDEvents Authors diff --git a/pkg/api/bindings.go b/pkg/api/bindings.go index f81fe5c..95738b2 100644 --- a/pkg/api/bindings.go +++ b/pkg/api/bindings.go @@ -16,8 +16,6 @@ limitations under the License. SPDX-License-Identifier: Apache-2.0 */ -//go:generate go run ../../tools/generator.go --resources ../.. - package api import (