If the executable is not in PATH, you need to specify the path to the executable either absolute or relative (with leading ./ for the current working dir).
Exactly as Norbert says. You must have linuxScanner in one of the directories specified by the $PATH variable or use an relative path ./linuxScanner . is current directory or an absolute path like /home/xxx/my-folder/another-folder/linuxScanner.
If you want to put the script inside the go program. You could do it something like this:
package main
# Backticks are used for multiline raw strings
var pythonProgram = `
#!/usr/bin/python
a = "World"
print "Hello " + a
`
He should even be able to write that to stdin of python to run it. That way he doesn’t need to create temporary files which might come with permission issues (but usually doesn’t)
I assume you have just taken if err := cmd.Run(); err != nil { panic(err) } from my example as is?
So your python script is doing something like exit(1), this is understood as an errornous execution (everything unequal to 0 is) and therefore give you the useless error, that execution failed due to exit status x. Parsing this message is the only way to get the exitcode reliably.
The second exit status 2 is the exit status of your go program. go sometimes prints this information for some reason.