Skip to content

feat: let pb value to native go type equals Message.filed#1219

Open
yywing wants to merge 1 commit intogoogle:masterfrom
yywing:fix_pb_type
Open

feat: let pb value to native go type equals Message.filed#1219
yywing wants to merge 1 commit intogoogle:masterfrom
yywing:fix_pb_type

Conversation

@yywing
Copy link
Copy Markdown

@yywing yywing commented Sep 25, 2025

Let pb value to native go type equals Message.filed.

env: variable a is proto.Message. a.list is []string

func ReadList(v ref.Value) ref.Value {
      switch v.Value.(type) {
      case []string:
              return v
      default:
             painc("a")
      }
}

readList(a.list) will panic

@google-cla
Copy link
Copy Markdown

google-cla Bot commented Sep 25, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@yywing yywing force-pushed the fix_pb_type branch 2 times, most recently from 5c9ad4c to 7bfdbb4 Compare September 25, 2025 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant