protobuf: Index | Files

package pragma

import ""

Package pragma provides types that can be embedded into a struct to statically enforce or prevent certain language properties.


Package Files


type DoNotCompare Uses

type DoNotCompare [0]func()

DoNotCompare can be embedded in a struct to prevent comparability.

type DoNotCopy Uses

type DoNotCopy [0]sync.Mutex

DoNotCopy can be embedded in a struct to help prevent shallow copies. This does not rely on a Go language feature, but rather a special case within the vet checker.


type DoNotImplement Uses

type DoNotImplement interface{ ProtoInternal(DoNotImplement) }

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.

type NoUnkeyedLiterals Uses

type NoUnkeyedLiterals struct{}

NoUnkeyedLiterals can be embedded in a struct to prevent unkeyed literals.

Package pragma imports 1 packages (graph) and is imported by 18 packages. Updated 2020-09-09. Refresh now. Tools for package owners.