File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,9 @@ go build
21
21
## Usage
22
22
To generate Hessian2 code using ` protoc-gen-go-hessian2 ` , you can use the following command:
23
23
``` shell
24
- protoc --go-hessian2_out=. --go-hessian2_opt=paths=source_relative your_file.proto
24
+ protoc -I ./ \
25
+ --go-hessian2_out=./ --go-hessian2_opt=paths=source_relative \
26
+ ./greet.proto
25
27
```
26
28
The ` --go-hessian2_out ` option specifies the output directory for the generated code,
27
29
and ` --go-hessian2_opt=paths=source_relative ` sets the output path to be relative to the source file.
@@ -33,7 +35,7 @@ syntax = "proto3";
33
35
34
36
package greet;
35
37
36
- option go_package = ";greet";
38
+ option go_package = "some_path/greet ;greet";
37
39
38
40
import "unified_idl_extend/unified_idl_extend.proto";
39
41
@@ -58,7 +60,9 @@ and set `java_class_name` to the corresponding Java class name.
58
60
59
61
Then, you can run the following command to generate the Hessian2 code:
60
62
``` shell
61
- protoc --go-hessian2_out=. --go-hessian2_opt=paths=source_relative greet/greet.proto
63
+ protoc -I ./ \
64
+ --go-hessian2_out=./ --go-hessian2_opt=paths=source_relative \
65
+ ./greet.proto
62
66
```
63
67
64
68
This will generate the ` greet.hessian2.go ` file in the same directory as your ` greet.proto ` file:
You can’t perform that action at this time.
0 commit comments