Why I Love Golang
Golang is fast, it is easy and is easily compilable to run on any architecture. It comes close to the speed of C. It has a garbage collector, so no memory issues to handle. It comes with optimized libraries, basically libraries for any popular online API. It has a static type system, so we can be sure there are no errors. It helps us build concurrent systems and to write concurrent code. Its compiler is also fast. Its dependencies are managed cleanly. It has great tooling, code formatters, compile time errors, etc. Everybody could understand its code right away with only a bit of experience. And it has consistent, very small and easy Dockerfiles. We don't need huge build tools, learn framework specific install steps like we have often with JS frameworks or other special package managers. The steps to build the code stay the same, they stay consistent and simple.
FROM golang:1.22 as build
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY ./src ./src
RUN CGO_ENABLED=0 GOOS=linux go build -o server ./src
FROM alpine:latest
WORKDIR /app
COPY --from=build ./app/server server
CMD ["./server"]