Skip to content

Commit f32b872

Browse files
authored
Merge pull request #137 from Raytar/proto3-optional
Support the optional keyword in proto3
2 parents 1d96a8e + a0d6693 commit f32b872

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

cmd/protoc-gen-gorums/main.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@ import (
1111
"github.com/relab/gorums/internal/version"
1212

1313
"google.golang.org/protobuf/compiler/protogen"
14+
"google.golang.org/protobuf/types/pluginpb"
1415
)
1516

1617
const (
17-
bundleLen = len("--bundle=")
18-
genGorumsDocURL = "https://github.com/relab/gorums/blob/master/doc/user-guide.md"
19-
genGoDocURL = "https://developers.google.com/protocol-buffers/docs/reference/go-generated"
18+
bundleLen = len("--bundle=")
19+
genGorumsDocURL = "https://github.com/relab/gorums/blob/master/doc/user-guide.md"
20+
genGoDocURL = "https://developers.google.com/protocol-buffers/docs/reference/go-generated"
21+
supportedFeatures = uint64(pluginpb.CodeGeneratorResponse_FEATURE_PROTO3_OPTIONAL)
2022
)
2123

2224
func main() {
@@ -59,6 +61,7 @@ func main() {
5961
}
6062
}
6163
}
64+
gen.SupportedFeatures = supportedFeatures
6265
return nil
6366
})
6467
}

0 commit comments

Comments
 (0)