diff options
| author | Jeff Carr <[email protected]> | 2025-01-12 08:28:23 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-01-12 08:28:23 -0600 |
| commit | 10f75f87a66a9329fd665bd85099fe94c7beae79 (patch) | |
| tree | 5746e3e18d3bdf3d8213798436ee93d0dd052772 /example | |
| parent | 721bbd8f92d80286f12509fbbcff9f2f8e334093 (diff) | |
add nomutex support to disable it per message struct
Diffstat (limited to 'example')
| -rw-r--r-- | example/fruit.proto | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/example/fruit.proto b/example/fruit.proto index d43a741..65e36f1 100644 --- a/example/fruit.proto +++ b/example/fruit.proto @@ -15,24 +15,24 @@ package main; import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp -message Apple { // `autogenpb:marshal` +message Apple { string name = 1; // `autogenpb:unique` // generates SortByxxx() and AppendUnique() functions string genus = 2; // `autogenpb:unique` // generates same thing here but SortByGenus() google.protobuf.Timestamp ctime = 3; // when the apple was born } -message Pear { +message Pear { // `autogenpb:nomutex` string name = 1; // `autogenpb:sort` string favorite = 2; // `autogenpb:sort` `autogenpb:unique` } -message Banana { +message Banana { // `autogenpb:nomutex` repeated string name = 1; // `autogenpb:sort` string favorite = 2; // `autogenpb:sort` `autogenpb:unique` string country = 3; // `autogenpb:sort` } -message Basket { +message Basket { // `autogenpb:nomutex` repeated string name = 1; // `autogenpb:sort` `autogenpb:unique` string favorite = 2; // `autogenpb:sort` `autogenpb:unique` int64 price = 3; // `autogenpb:sort` @@ -42,7 +42,7 @@ message Basket { } // "Fruit" must exist. you can put anything in it -message Fruit { // `autogenpb:marshal` +message Fruit { string brand = 1; // `autogenpb:unique` `autogenpb:sort` repeated Apple apples = 2; repeated Pear pears = 3; |
