开源地址:
git clone https://gitee.com/leijmdas/gomonitor.git
操作步骤:
在一个git目录下分不同gomod子工程,不用打tag
使用go work支持:
创建4个工程,然后
Go work init api grpc admin web
使用admin引用api的代码
package datafile import ( "api/domain/db/dao" "git.ichub.com/general/webcli120/goconfig/base/basedata" "git.ichub.com/general/webcli120/goconfig/base/fileutils" "git.ichub.com/general/webcli120/goconfig/ichubconfig" "github.com/sirupsen/logrus" "github.com/stretchr/testify/suite" "testing" )
func (this *TestDataPathSuite) Test004_daoapi() { logrus.Info(5) var result = dao.InstMetadataColumnDao.QueryModel() logrus.Info(result) }