1 Star 0 Fork 0

dream_hat/dreamgo

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
viox.go 728 Bytes
一键复制 编辑 原始数据 按行查看 历史
dream_hat 提交于 2023-12-20 10:57 +08:00 . init
package dream
import (
"fmt"
"sync"
)
type XY int16
type IRun interface {
Run(wg *sync.WaitGroup)
}
type IStop interface {
Stop()
}
var workPath string
func init() {
workPath = GetCurrentPath()
//workPath, _ = os.Getwd()
fmt.Println("WorkPath:", workPath)
}
func SetWorkPath(s string) {
workPath = s
fmt.Println("WorkPath:", workPath)
}
func GetWorkPath() string {
return workPath
}
func Assert(cond bool, format string, a ...interface{}) {
if !cond {
fmt.Println("--- --- Assertion Failed --- --- ---")
if a == nil || len(a) == 0 {
panic(format)
} else {
panic(fmt.Sprintf(format, a...))
}
}
}
func AssertImposible(cond bool, format string, a ...interface{}) {
Assert(!cond, format, a...)
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/dream_hat/dreamgo.git
git@gitee.com:dream_hat/dreamgo.git
dream_hat
dreamgo
dreamgo
v1.1.2

搜索帮助