Skip to content

Commit

Permalink
use tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasJenicek committed Sep 30, 2024
1 parent 1afdb0d commit eb898b7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
with:
go-version: "1.20"
- name: Install webrpc-gen (development)
run: git clone --single-branch https://github.com/webrpc/webrpc.git --branch deprecate_methods_v2 && cd webrpc && make install
run: git clone --single-branch https://github.com/webrpc/webrpc.git --branch master && cd webrpc && make install

- name: Regenerate examples
run: cd _examples && make generate
Expand Down
16 changes: 8 additions & 8 deletions _examples/golang-imports/api.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions server.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ func (s *{{$serviceName}}) ServeHTTP(w http.ResponseWriter, r *http.Request) {
switch contentType {
case "application/json":
if s.OnRequest != nil {
if err := s.OnRequest(w, r); err != nil {
rpcErr, ok := err.(WebRPCError)
if !ok {
rpcErr = ErrWebrpcEndpoint.WithCause(err)
}
s.sendErrorJSON(w, r, rpcErr)
return
}
if err := s.OnRequest(w, r); err != nil {
rpcErr, ok := err.(WebRPCError)
if !ok {
rpcErr = ErrWebrpcEndpoint.WithCause(err)
}
s.sendErrorJSON(w, r, rpcErr)
return
}
}

handler(ctx, w, r)
Expand Down

0 comments on commit eb898b7

Please sign in to comment.