More incremental progress.
This commit is contained in:
parent
ab3b46713f
commit
ed4bbeb608
4 changed files with 107 additions and 6 deletions
21
subprocess/command.go
Normal file
21
subprocess/command.go
Normal file
|
@ -0,0 +1,21 @@
|
|||
package subprocess
|
||||
|
||||
/* This file manages creating the command line arguments to the subprocess */
|
||||
|
||||
/* Method which module http calls to create the subprocess */
|
||||
func Run(path string, body []byte) (status int, bodyContents []byte, err error) {
|
||||
arguments := getArguments(path, body);
|
||||
|
||||
// Don't know what to do with this request
|
||||
if arguments == nil {return 404, []byte("Unknown request\n"), nil;}
|
||||
|
||||
// Call subprocess
|
||||
status, bodyContents, err = runCommand(arguments);
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
/* Converts a request into the correct binary arguments */
|
||||
func getArguments(path string, body []byte) []string {
|
||||
return nil // For now
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue