github.com/kaisenlinux/docker.io@v0.0.0-20230510090727-ea55db55fac7/swarmkit/protobuf/plugin/helpers.go (about)

     1  package plugin
     2  
     3  import (
     4  	"github.com/gogo/protobuf/proto"
     5  	google_protobuf "github.com/gogo/protobuf/protoc-gen-gogo/descriptor"
     6  )
     7  
     8  // DeepcopyEnabled returns true if deepcopy is enabled for the descriptor.
     9  func DeepcopyEnabled(options *google_protobuf.MessageOptions) bool {
    10  	return proto.GetBoolExtension(options, E_Deepcopy, true)
    11  }