1// Copyright 2018 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// Package flags provides a set of flags controlled by build tags. 6package flags 7 8// ProtoLegacy specifies whether to enable support for legacy functionality 9// such as MessageSets, weak fields, and various other obscure behavior 10// that is necessary to maintain backwards compatibility with proto1 or 11// the pre-release variants of proto2 and proto3. 12// 13// This is disabled by default unless built with the "protolegacy" tag. 14// 15// WARNING: The compatibility agreement covers nothing provided by this flag. 16// As such, functionality may suddenly be removed or changed at our discretion. 17const ProtoLegacy = protoLegacy 18 19// LazyUnmarshalExtensions specifies whether to lazily unmarshal extensions. 20// 21// Lazy extension unmarshaling validates the contents of message-valued 22// extension fields at unmarshal time, but defers creating the message 23// structure until the extension is first accessed. 24const LazyUnmarshalExtensions = ProtoLegacy 25