Generated struct field names should be PascalCase without underscores
- Dominant language
- Go
- Stars
- 95
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
The avrogo code generator produces non-idiomatic Go struct field names when Avro schema fields contain underscores. It preserves underscores in field names (e.g., Event_type) instead of converting to proper PascalCase (e.g., EventType).
{
"type": "record",
"name": "TestEvent",
"namespace": "test.events",
"fields": [
{
"name": "event_type",
"type": "string"
},
{
"name": "user_id",
"type": "string"
}
]
}
generates
type TestEvent struct {
Event_type string `json:"event_type"`
User_id string `json:"user_id"`
}
not
type TestEvent struct {
EventType string `json:"event_type"`
UserId string `json:"user_id"`
}
### save the exampel schema to disk and run ###
avrogo -p test test_event.avsc
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.