feat: 增加删除功能

This commit is contained in:
zhengkunwang223
2022-09-26 22:54:38 +08:00
committed by zhengkunwang223
parent c6219707ec
commit c3274af4cd
7 changed files with 54 additions and 10 deletions

View File

@@ -28,3 +28,12 @@ func Restart(filePath string) (string, error) {
}
return string(stdout), nil
}
func Rmf(filePath string) (string, error) {
cmd := exec.Command("docker-compose", "-f", filePath, "rm", "-f")
stdout, err := cmd.CombinedOutput()
if err != nil {
return "", err
}
return string(stdout), nil
}