File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 22setlocal
33
44rem Define array elements
5- set " PROTO_NAMES = auth conversation errinfo friend group msg msggateway push rtc sdkws third user statistics"
5+ set " PROTO_NAMES = auth conversation errinfo friend group msg msggateway push rtc sdkws third user statistics wrapperspb "
66
77rem Loop through each element in the array
88for %%i in (%PROTO_NAMES% ) do (
9- protoc --go_out=plugins=grpc:./%%i --go_opt=module=github.com/openimsdk/protocol/%%i %%i /%%i .proto
9+ protoc --go_out=plugins=grpc:./%%i --go_opt=module=github.com/openimsdk/protocol/%%i %%i /%%i .proto
10+ if ERRORLEVEL 1 (
11+ echo error processing %%i .proto
12+ exit /b %ERRORLEVEL%
13+ )
1014)
1115
16+ rem Replace "omitempty" in *.pb.go files with UTF-8 encoding
17+ for /r %%f in (*.pb.go) do (
18+ powershell -Command " (Get-Content -Path '%%f ' -Encoding UTF8) -replace ',omitempty\" `" ', '\" `" ' | Set-Content -Path '%%f ' -Encoding UTF8"
19+ )
20+
21+
1222endlocal
You can’t perform that action at this time.
0 commit comments