Herbie Ong | cddf819 | 2018-11-28 18:25:20 -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 proto |
| 6 | |
Damien Neil | 0d3e8cc | 2019-04-01 13:31:55 -0700 | [diff] [blame] | 7 | import ( |
Damien Neil | 01b51b4 | 2020-01-17 13:40:51 -0800 | [diff] [blame^] | 8 | "google.golang.org/protobuf/internal/errors" |
Damien Neil | e89e624 | 2019-05-13 23:55:40 -0700 | [diff] [blame] | 9 | "google.golang.org/protobuf/reflect/protoreflect" |
Damien Neil | 0d3e8cc | 2019-04-01 13:31:55 -0700 | [diff] [blame] | 10 | ) |
Herbie Ong | cddf819 | 2018-11-28 18:25:20 -0800 | [diff] [blame] | 11 | |
| 12 | // Message is the top-level interface that all messages must implement. |
| 13 | type Message = protoreflect.ProtoMessage |
Damien Neil | 01b51b4 | 2020-01-17 13:40:51 -0800 | [diff] [blame^] | 14 | |
| 15 | // Error matches all errors produced by packages in the protobuf module. |
| 16 | // |
| 17 | // That is, errors.Is(err, Error) reports whether an error is produced |
| 18 | // by this module. |
| 19 | var Error error |
| 20 | |
| 21 | func init() { |
| 22 | Error = errors.Error |
| 23 | } |