MCPcopy
hub / github.com/protocolbuffers/protobuf-go / DoNotImplement

Interface DoNotImplement

internal/pragma/pragma.go:19–19  ·  view source on GitHub ↗

DoNotImplement can be embedded in an interface to prevent trivial implementations of the interface. This is useful to prevent unauthorized implementations of an interface so that it can be extended in the future for any protobuf language changes.

Source from the content-addressed store, hash-verified

17// This is useful to prevent unauthorized implementations of an interface
18// so that it can be extended in the future for any protobuf language changes.
19type DoNotImplement interface{ ProtoInternal(DoNotImplement) }
20
21// DoNotCompare can be embedded in a struct to prevent comparability.
22type DoNotCompare [0]func()

Callers

nothing calls this directly

Implementers 15

Fileinternal/filedesc/desc.go
Extensioninternal/filedesc/desc.go
Serviceinternal/filedesc/desc.go
Methodinternal/filedesc/desc.go
Namesinternal/filedesc/desc_list.go
EnumRangesinternal/filedesc/desc_list.go
FieldRangesinternal/filedesc/desc_list.go
FieldNumbersinternal/filedesc/desc_list.go
OneofFieldsinternal/filedesc/desc_list.go
SourceLocationsinternal/filedesc/desc_list.go
Enumsinternal/filedesc/desc_list_gen.go
EnumValuesinternal/filedesc/desc_list_gen.go

Calls

no outgoing calls

Tested by

no test coverage detected