Joe Tsai | 08e0030 | 2018-11-26 22:32:06 -0800 | [diff] [blame^] | 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 impl |
| 6 | |
| 7 | import pvalue "github.com/golang/protobuf/v2/internal/value" |
| 8 | |
| 9 | // TODO: Add a default LegacyWrapper that panics with a more helpful message? |
| 10 | var legacyWrapper pvalue.LegacyWrapper |
| 11 | |
| 12 | // RegisterLegacyWrapper registers a set of constructor functions that are |
| 13 | // called when a legacy enum or message is encountered that does not natively |
| 14 | // support the protobuf reflection APIs. |
| 15 | func RegisterLegacyWrapper(w pvalue.LegacyWrapper) { |
| 16 | legacyWrapper = w |
| 17 | } |