Noob Question about Go Modules - Do we need them on all the servers we run the executable on?


(Netizen) #1

Hi,
I am someone new to Go.
When I write a Perl or Python script and it has some modules, I need to ensure that the same Perl/Python version and the modules are installed on all the servers on which I am running the scripts.
Does this hold true for Go? I guess not, but just wanted to confirm.


(Norbert Melzer) #2

Compiled executables are selfcontained. So after compilation all you need to deploy is the executable.


(Netizen) #3

Hi NobbZ,
Thanks for replying. One of the reasons why I am interested in learning Go is this single binary executable. But, just wanted to confirm it. Sorry for asking such a noob question.


(Ricardo N Feliciano) #4

Never apologize for asking questions like this. This is how we learn.


(Netizen) #5

Hi Feliciano,
Thank you for the encouragement.