Open
Description
A CLI option to allow for the original name in the avro schema (or fullname) to be maintained and capitalized in the resulting go struct would be beneficial.
Schema
{
"name": "one_two_three_four__five",
"type": "record",
"fields": [
{
"name": "CreatedDate",
"type": "long",
"doc": "CreatedDate:DateTime"
}
]
}
Current
Command
avrogen -pkg salesforce -o x.go -tags json:snake x.avsc
Output
package salesforce
// Code generated by avro/gen. DO NOT EDIT.
// OneTwoThreeFourFive is a generated struct.
type OneTwoThreeFourFive struct {
CreatedDate int64 `avro:"CreatedDate" json:"created_date"`
}
Desired
Command (placeholder)
avrogen -pkg salesforce -o x.go -tags json:snake -originalname x.avsc
Output
package salesforce
// Code generated by avro/gen. DO NOT EDIT.
// One_two_three_four__five is a generated struct.
type One_two_three_four__five struct {
CreatedDate int64 `avro:"CreatedDate" json:"created_date"`
}
Activity