Yes, I see what you mean. But no, the AST is not executable. The Go Compiler does a bunch of other things before emitting an executable. In fact, “go run”, which gives the impression of interpreting a Go file, actually compiles and writes to a temporary file that it executes (basically, it does a “go build && ./binary-file”.)
Simple solution: make the Go Compiler (the “go” command) a dependency of your program and compile on demand. It is still quite a suspicious solution, but there are use cases.
For normal plugins, better than dynamic loading, you can just run other binaries and communicate via standard input and output with them. Check out “pie”: https://github.com/natefinch/pie