Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix CompactTextString panics with nested Anys and private fields #24

Merged
merged 7 commits into from
Nov 14, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix tests
  • Loading branch information
julienrbrt committed Nov 11, 2022
commit 7c3088b8ae47eae46645f78e9f7833634729a13f
5 changes: 0 additions & 5 deletions proto/text.go
Original file line number Diff line number Diff line change
Expand Up @@ -488,11 +488,6 @@ var textMarshalerType = reflect.TypeOf((*encoding.TextMarshaler)(nil)).Elem()
func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Properties) error {
v = reflect.Indirect(v)

// skip unexported fields
if !v.CanSet() {
return nil
}

if props != nil {
if len(props.CustomType) > 0 {
custom, ok := v.Interface().(Marshaler)
Expand Down