Skip to content

Commit

Permalink
tool: annotate generated Go field with proto mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
jingyih committed Dec 12, 2024
1 parent 4db732a commit df5ec47
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions dev/tools/controllerbuilder/pkg/codegen/typegenerator.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ func WriteField(out io.Writer, field protoreflect.FieldDescriptor, msg protorefl
}
}

fmt.Fprintf(out, "\t// +kcc:proto=%s\n", field.FullName())
fmt.Fprintf(out, "\t%s %s `json:\"%s,omitempty\"`\n",
goFieldName,
goType,
Expand Down

0 comments on commit df5ec47

Please sign in to comment.