remove unnecessary wrapping lambda, use function value directly (#372)

Found using https://go-critic.github.io/overview#unlambda-ref
This commit is contained in:
Iskander (Alex) Sharipov 2018-09-14 01:50:11 +01:00 committed by Bo-Yi Wu
parent 82c3ceb70d
commit 313544bde6
1 changed files with 3 additions and 11 deletions

14
main.go
View File

@ -232,23 +232,15 @@ func main() {
var g errgroup.Group
g.Go(func() error {
return gorush.InitAPNSClient()
})
g.Go(gorush.InitAPNSClient)
g.Go(func() error {
_, err := gorush.InitFCMClient(gorush.PushConf.Android.APIKey)
return err
})
g.Go(func() error {
// Run httpd server
return gorush.RunHTTPServer()
})
g.Go(func() error {
// Run gRPC internal server
return rpc.RunGRPCServer()
})
g.Go(gorush.RunHTTPServer) // Run httpd server
g.Go(rpc.RunGRPCServer) // Run gRPC internal server
if err = g.Wait(); err != nil {
gorush.LogError.Fatal(err)