init project

This commit is contained in:
yanghao05
2023-01-28 11:09:11 +08:00
parent 11a561bdd7
commit 114c003b2b
38 changed files with 2011 additions and 0 deletions

20
providers/rpc/assets.go Normal file
View File

@@ -0,0 +1,20 @@
package rpc
import (
"log"
"app/container"
"app/proto"
"go-micro.dev/v4"
)
func init() {
err := container.Container.Provide(func(svc micro.Service) proto.WebApiService {
return proto.NewWebApiService("web.api", svc.Client())
})
if err != nil {
log.Fatal(err)
}
}