...

Source file src/google.golang.org/protobuf/proto/proto_methods.go

Documentation: google.golang.org/protobuf/proto

     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  //go:build !protoreflect
     7  // +build !protoreflect
     8  
     9  package proto
    10  
    11  import (
    12  	"google.golang.org/protobuf/reflect/protoreflect"
    13  	"google.golang.org/protobuf/runtime/protoiface"
    14  )
    15  
    16  const hasProtoMethods = true
    17  
    18  func protoMethods(m protoreflect.Message) *protoiface.Methods {
    19  	return m.ProtoMethods()
    20  }
    21  

View as plain text