So everyone has been saying how awesome Golang is, and at this moment, I am quite curious to fiddle with it.
Golang Environment: Golang Docker Image
A quick way to get a Golang Environment, will be to use Docker. We will be using the Alpine tag:
1
|
|
Our Basic App
After we are in our container, lets write our first Hello World App:
1 2 3 4 5 6 7 |
|
Running our App:
Using golang to run our app:
1 2 |
|
We can also build our app to create a executable binary:
1
|
|
You will find that there is a executable binary named app
placed in the current working directory. Let’s execute it:
1 2 |
|
This was a very basic example, but will add more examples as I am learning the language