mirror of
https://codeberg.org/PLG-Development/PLG-MuDiCS
synced 2026-07-06 00:47:09 +00:00
feat(control): store api (#3)
This commit is contained in:
+4
-2
@@ -12,7 +12,9 @@ type CommandResponse struct {
|
||||
ExitCode int `json:"exitCode"`
|
||||
}
|
||||
|
||||
|
||||
type ErrorResponse struct {
|
||||
Error string `json:"error"`
|
||||
}
|
||||
|
||||
func RunShellCommand(cmd *exec.Cmd) CommandResponse {
|
||||
var stdout, stderr bytes.Buffer
|
||||
@@ -35,4 +37,4 @@ func RunShellCommand(cmd *exec.Cmd) CommandResponse {
|
||||
}
|
||||
|
||||
return commandOutput
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user