1 Star 0 Fork 0

fullstack / mage

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
helpers.go 366 Bytes
一键复制 编辑 原始数据 按行查看 历史
Nate Finch 提交于 2017-10-02 22:22 . Helpers galore (#26)
package sh
import (
"fmt"
"os"
)
// Rm removes the given file or directory even if non-empty. It will not return
// an error if the target doesn't exist, only if the target cannot be removed.
func Rm(path string) error {
err := os.RemoveAll(path)
if err == nil || os.IsNotExist(err) {
return nil
}
return fmt.Errorf(`failed to remove %s: %v`, path, err)
}
1
https://gitee.com/fullstack_admin/mage.git
git@gitee.com:fullstack_admin/mage.git
fullstack_admin
mage
mage
v1.0.2

搜索帮助