Codegen Go-native tool
- Dominant language
- Go
- Stars
- 4
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
Rewrite `codegen-library.sh` script into a Golang tool `knative.dev/toolbox/codegen`. The current script:
https://github.com/knative/hack/blob/158898889ae8670c7e68e522e32cd6800e1729a0/codegen-library.sh#L19-L35
Invent new CLI, for example:
```sh
go run knative.dev/toolbox/codegen@latest k8s \
"deepcopy,client,informer,lister" \
knative.dev/serving/pkg/client knative.dev/serving/pkg/apis \
"serving:v1 serving:v1beta1 autoscaling:v1alpha1"
go run knative.dev/toolbox/codegen@latest knative \
"injection" \
knative.dev/serving/pkg/client knative.dev/serving/pkg/apis \
"serving:v1 serving:v1beta1 autoscaling:v1alpha1"
go run knative.dev/toolbox/codegen@latest deepcopy-gen \
-i knative.dev/serving/pkg/apis/config \
-i knative.dev/serving/pkg/reconciler/route/config \
-i knative.dev/serving/pkg/autoscaler/config/autoscalerconfig \
-i knative.dev/serving/pkg/autoscaler/scaling \
-i knative.dev/serving/pkg/deployment \
-i knative.dev/serving/pkg/gc
```
Contributor guide
Assessment
This issue has not been assessed yet.