Sha256: d3babf1e4b0b32f721a0dd3e6c3e31fc573d550fd9a1d51e543f40482b0fc6f5

Contents?: true

Size: 1.08 KB

Versions: 5

Compression:

Stored size: 1.08 KB

Contents

// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

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

import "sync"

// NoUnkeyedLiterals can be embedded in a struct to prevent unkeyed literals.
type NoUnkeyedLiterals struct{}

// 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 DoNotImplement interface{ ProtoInternal(DoNotImplement) }

// DoNotCompare can be embedded in a struct to prevent comparability.
type DoNotCompare [0]func()

// 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.
//
// See https://golang.org/issues/8005.
type DoNotCopy [0]sync.Mutex

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
planetscale-0.3.1 vendor/google.golang.org/protobuf/internal/pragma/pragma.go
planetscale-0.3.0 vendor/google.golang.org/protobuf/internal/pragma/pragma.go
planetscale-0.2.1 vendor/google.golang.org/protobuf/internal/pragma/pragma.go
planetscale-0.2.0 vendor/google.golang.org/protobuf/internal/pragma/pragma.go
planetscale-0.1.0 vendor/google.golang.org/protobuf/internal/pragma/pragma.go