package svc import ( "app.yhyue.com/moapp/jyfs/api/internal/config" "app.yhyue.com/moapp/jyfs/rpc/filesystemclient" "github.com/zeromicro/go-zero/zrpc" ) type ServiceContext struct { Config config.Config FileSystem filesystemclient.FileSystem } func NewServiceContext(c config.Config) *ServiceContext { return &ServiceContext{ Config: c, FileSystem: filesystemclient.NewFileSystem(zrpc.MustNewClient(c.FileSystemConf)), } }