-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add editions support to protoprint (#600)
The protoprint package doesn't support editions yet, but protoprint now does.
- Loading branch information
1 parent
7624c3a
commit 0935deb
Showing
43 changed files
with
806 additions
and
322 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
edition = "2023"; | ||
|
||
package testprotos; | ||
|
||
option features = { enum_type: CLOSED }; | ||
|
||
option go_package = "github.com/jhump/protoreflect/internal/testprotos"; | ||
|
||
message Foo { | ||
reserved reserved_field; | ||
|
||
int32 a = 1; | ||
|
||
int32 required_field = 2 [features = { field_presence: LEGACY_REQUIRED }]; | ||
|
||
int32 default_field = 3 [default = 99]; | ||
|
||
DelimitedField delimitedfield = 4 [features = { message_encoding: DELIMITED }]; | ||
|
||
message DelimitedField { | ||
int32 b = 1; | ||
} | ||
} | ||
|
||
enum Closed { | ||
CLOSED_C = 1; | ||
|
||
CLOSED_A = 2; | ||
|
||
reserved CLOSED_E, CLOSED_F; | ||
} | ||
|
||
enum Open { | ||
option features = { enum_type: OPEN }; | ||
|
||
OPEN_B = 0; | ||
|
||
OPEN_C = -1; | ||
|
||
OPEN_A = 2; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.