mirror of
https://github.com/chai2010/advanced-go-programming-book.git
synced 2025-05-24 12:32:21 +00:00
11 lines
260 B
Protocol Buffer
11 lines
260 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package main;
|
|
|
|
import "github.com/mwitkow/go-proto-validators/validator.proto";
|
|
|
|
message Message {
|
|
string important_string = 1 [(validator.field) = {regex: "^[a-z]{2,5}$"}];
|
|
int32 age = 2 [(validator.field) = {int_gt: 0, int_lt: 100}];
|
|
}
|