Initial commit

This commit is contained in:
Donny
2019-04-22 20:46:32 +08:00
commit 49ab8aadd1
25441 changed files with 4055000 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
package service
import (
"context"
"go-common/app/interface/main/shorturl/conf"
shortdao "go-common/app/interface/main/shorturl/dao"
"go-common/library/log"
)
// Service service struct
type Service struct {
shortd *shortdao.Dao
}
// New new service
func New(c *conf.Config) (s *Service) {
s = &Service{
shortd: shortdao.New(c),
}
return
}
// Ping ping service.
func (s *Service) Ping(c context.Context) (err error) {
if err = s.shortd.Ping(c); err != nil {
log.Error("s.dao.Ping error(%v)", err)
}
return
}