blob: 360a1ee1c80a7adc1412e102dd8a55cd985a3218 [file] [log] [blame]
Damien Neilcc2b0782019-04-05 14:33:10 -07001// 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
8package proto
9
10import "github.com/golang/protobuf/v2/runtime/protoiface"
11
12func protoMethods(m Message) *protoiface.Methods {
13 if x, ok := m.(protoiface.Methoder); ok {
14 return x.XXX_Methods()
15 }
16 return nil
17}