Skip to content

Commit ce76c44

Browse files
committed
Ignore non protobuf flow fields
1 parent 8b57f4f commit ce76c44

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

flow/flow.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1500,8 +1500,9 @@ func structFieldKeys(t reflect.Type, prefix string) []string {
15001500
vField := t.Field(i)
15011501
tField := vField.Type
15021502

1503-
// ignore XXX fields as they are considered as private
1504-
if strings.HasPrefix(vField.Name, "XXX_") {
1503+
// ignore both XXX fields - as they are considered as private - and internal fields
1504+
protoTag := vField.Tag.Get("protobuf")
1505+
if strings.HasPrefix(vField.Name, "XXX_") || protoTag == "" {
15051506
continue
15061507
}
15071508

0 commit comments

Comments
 (0)