Can't execute Go source file on windows
Keithcat1 opened this issue · comments
go version go1.13.5 windows/amd64
C:\py>gomacro hi.go
C:\py>
#hi.go
package main
func main() {
print("Hi!")
}
Also, when I attemped to run it on a different file, it still didn't execute it, but it did complain because a function in the file that was referenced wasn't declared yet. I think this is a limitation though.
After I fixed it, I got some warnings about redefined identifiers.
The main()
function is not executed automatically, it's a know limitation - see #62
You can either add a line
main()
at the end of the file,
or run gomacro hi.go -e "main()"
I figured out how it works.
But how do I pass command line arguments to the script?
Thanks!