Damien Neil | cc2b078 | 2019-04-05 14:33:10 -0700 | [diff] [blame] | 1 | // Copyright 2019 The Go Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
| 5 | // The protoreflect build tag disables use of fast-path methods. |
| 6 | // +build !protoreflect |
| 7 | |
| 8 | package proto |
| 9 | |
Damien Neil | e89e624 | 2019-05-13 23:55:40 -0700 | [diff] [blame] | 10 | import "google.golang.org/protobuf/runtime/protoiface" |
Damien Neil | cc2b078 | 2019-04-05 14:33:10 -0700 | [diff] [blame] | 11 | |
| 12 | func protoMethods(m Message) *protoiface.Methods { |
| 13 | if x, ok := m.(protoiface.Methoder); ok { |
| 14 | return x.XXX_Methods() |
| 15 | } |
| 16 | return nil |
| 17 | } |