Skip to content

Conversation

@yywing
Copy link

@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

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