Steps to reproduce: - Run `curl -v -d '{\"id\": \"44923378-ac56-4870-a64c-e97aad95a0db\", \"name\": \"myapp\", \"executable\": \"sleep\", \"args\": [\"infinity\"]}' http://localhost:8080/tasks` in PowerShell - Run `curl -X DELETE http://localhost:8080/tasks/44923378-ac56-4870-a64c-e97aad95a0db` Expected behavior: - The task with `44923378-ac56-4870-a64c-e97aad95a0db` ID to be deleted Actual behavior: - An error because `task.Process` is `nil` Possible solution: - Store `exec.Cmd` in the `Task` structure instead of the `os.Process`
Steps to reproduce:
curl -v -d '{\"id\": \"44923378-ac56-4870-a64c-e97aad95a0db\", \"name\": \"myapp\", \"executable\": \"sleep\", \"args\": [\"infinity\"]}' http://localhost:8080/tasksin PowerShellcurl -X DELETE http://localhost:8080/tasks/44923378-ac56-4870-a64c-e97aad95a0dbExpected behavior:
44923378-ac56-4870-a64c-e97aad95a0dbID to be deletedActual behavior:
task.ProcessisnilPossible solution:
exec.Cmdin theTaskstructure instead of theos.Process