Kindsys: Simpler PascalCase name handling (#62150)

This commit is contained in:
sam boyer
2023-01-25 15:29:10 -05:00
committed by GitHub
parent 402345ac08
commit 4a1d418157
16 changed files with 269 additions and 274 deletions

View File

@@ -14,7 +14,6 @@ import (
"cuelang.org/go/cue/cuecontext"
"github.com/dave/dst"
"github.com/dave/dst/dstutil"
"github.com/grafana/codejen"
"github.com/grafana/grafana/pkg/codegen"
"github.com/grafana/grafana/pkg/cuectx"
@@ -62,9 +61,7 @@ func (j *jennytypego) JennyName() string {
}
func (j *jennytypego) Generate(lin thema.Lineage) (*codejen.File, error) {
f, err := codegen.GoTypesJenny{ApplyFuncs: []dstutil.ApplyFunc{
codegen.PrefixReplacer("Plugindef", "PluginDef"),
}}.Generate(codegen.SchemaForGen{
f, err := codegen.GoTypesJenny{}.Generate(codegen.SchemaForGen{
Name: "PluginDef",
Schema: lin.Latest(),
IsGroup: false,