feat: 增加删除功能
This commit is contained in:

committed by
zhengkunwang223

parent
c6219707ec
commit
c3274af4cd
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user