This is a hello world
program written in go lang.
This program create a http server which listens on 0.0.0.0:8080
.
It will print Hello, World!
and local time when it receive any http request.
If you run this program on localhost, and curl localhost:8080
, you will get something like this:
Hello, World!
2021-08-29 12:28:53.270909 +0800 CST
make
: the same asmake image
make image
: build a docker image (OS=linux, Arch=amd64) taggedcloudecho/hello:latest
make build
: same asgo build -o bin/ .