3 Star 8 Fork 3

yasenagat / daminghu-cli

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
cfg.go 1.34 KB
一键复制 编辑 原始数据 按行查看 历史
yasenagat 提交于 2019-03-17 13:43 . U-dist path
package cfg
var (
Cfg Config
)
type Config struct {
PrefixProjectUri string
ProjectName string
Port string
PreUrl string
LocalTemplate bool
ServerTemplatePath string
WebTemplatePath string
//ServerDistPath string
//WebDistPath string
DistPath string
DBSchema string
DBUsername string
DBPassword string
DBPort string
DBIp string
DBConnParam string
}
func (cfg Config) GetMySqlConn() string {
return cfg.DBUsername + ":" + cfg.DBPassword + "@tcp(" + cfg.DBIp + ":" + cfg.DBPort + ")/" + cfg.DBSchema + cfg.DBConnParam
}
func (cfg Config) GetFullProjectUri() string {
return cfg.PrefixProjectUri + "/" + cfg.GetServerProjcetName()
}
func (cfg Config) GetServerProjcetPath() string {
return cfg.DistPath + "" + cfg.GetServerProjcetName() + "/"
}
func (cfg Config) GetWebProjcetPath() string {
return cfg.DistPath + "" + cfg.GetWebProjcetName() + "/"
}
func (cfg Config) GetWebProjcetSrcPath() string {
return cfg.GetWebProjcetPath() + "src/"
}
func (cfg Config) GetServerProjcetName() string {
return cfg.ProjectName + "-svr"
}
func (cfg Config) GetWebProjcetName() string {
return cfg.ProjectName + "-web"
}
func (cfg Config) GetWebTempPath() string {
return cfg.DistPath + "temp/"
}
func (cfg Config) GetServerTempPath() string {
return cfg.DistPath + "temp/"
}
Go
1
https://gitee.com/godY/daminghu-cli.git
git@gitee.com:godY/daminghu-cli.git
godY
daminghu-cli
daminghu-cli
a3600d7700b8

搜索帮助