Skip to content

Commit

Permalink
Merge pull request #1726 from owncloud/graph-linter
Browse files Browse the repository at this point in the history
Graph linter
  • Loading branch information
butonic committed Feb 25, 2021
2 parents b01a549 + 3f30ea1 commit a7b2f4d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions graph/go.sum
Expand Up @@ -1761,6 +1761,7 @@ golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4 h1:myAQVi0cGEoqQVR5POX+8RR2m
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c h1:VwygUrnw9jn88c4u8GD3rZQbqrP/tgas88tPUbBxQrk=
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210218155724-8ebf48af031b h1:lAZ0/chPUDWwjqosYR0X4M490zQhMsiJ4K3DbA7o+3g=
golang.org/x/sys v0.0.0-20210218155724-8ebf48af031b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221 h1:/ZHdbVpdR/jk3g30/d4yUL0JU9kksj8+F/bnQUVLGDM=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
Expand Down
8 changes: 6 additions & 2 deletions graph/pkg/server/debug/server.go
Expand Up @@ -34,7 +34,9 @@ func health(cfg *config.Config) func(http.ResponseWriter, *http.Request) {

// TODO(tboerger): check if services are up and running

io.WriteString(w, http.StatusText(http.StatusOK))
if _, err := io.WriteString(w, http.StatusText(http.StatusOK)); err != nil {
panic(err)
}
}
}

Expand All @@ -46,6 +48,8 @@ func ready(cfg *config.Config) func(http.ResponseWriter, *http.Request) {

// TODO(tboerger): check if services are up and running

io.WriteString(w, http.StatusText(http.StatusOK))
if _, err := io.WriteString(w, http.StatusText(http.StatusOK)); err != nil {
panic(err)
}
}
}
4 changes: 3 additions & 1 deletion graph/pkg/server/http/server.go
Expand Up @@ -54,7 +54,9 @@ func Server(opts ...Option) (http.Service, error) {
handle = svc.NewTracing(handle)
}

micro.RegisterHandler(service.Server(), handle)
if err := micro.RegisterHandler(service.Server(), handle); err != nil {
return http.Service{}, err
}

service.Init()
return service, nil
Expand Down

0 comments on commit a7b2f4d

Please sign in to comment.