Skip to content

Conversation

@taeuk
Copy link
Contributor

@taeuk taeuk commented Jun 30, 2025

Summary

  • Fix struct tag parsing to handle comma-separated tag values correctly
  • Parse only the field name portion before the first comma (e.g., avro:"field_name,omitempty" → field name is field_name)
  • This follows Go's standard convention for struct tags

Changes

  • Added strings.Cut() to extract only the field name before the comma
  • Previously the entire tag value including options was incorrectly used as the field name

Parse only the field name portion before comma in struct tags to handle
tags like "field_name,omitempty" correctly. This follows Go's standard
convention where struct tag values are comma-separated with the field
name appearing before the first comma.

Previously the entire tag value including options was used as the field name.
@nrwiersma nrwiersma merged commit 5ec06b3 into hamba:main Jun 30, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants