Golang related tutorials with the sample project.
For most of the tutorials, we will use this project as an example. It's an example "search-engine" project with Golang as back-end.
Make sure to check the repository, use "Star" and "Watch" to show your support and get the latest updates.
Idea, Topics & Project
- Next: project structure
- It's a real-world Golang example
- It's not a course
- It's not a basics of the language
- REST API in Golang
- Go with MongoDB / Go with MySQL
- Unit testing in Golang
- Using mocks in Go tests
- Gomock vs. Mockgen within a real project
- Integration/component testing in Go
- Go REST API documentation
- Docker and Docker Compose for Go application
- Test tool: useful testing commands
- Set up project structure
- Example REST API
Go Application Project Layout.
Multistage Docker image for Go application.
FROM golang:latest as builder RUN mkdir /app WORKDIR /app COPY . ./ RUN make test ARG version=dev RUN CGO_ENABLED=0 GOOS=linux go build -mod=vendor -a -installsuffix cgo -ldflags "-X main.version=$version" -o kn-be-sd -v ./cmd/sd/main.go FROM alpine COPY --from=builder /app/kn-be-sd /
# 1. Use example repository # https://github.com/KenanBek/kn # 2. Multitage Dockerfile # 3. Build image with tag name # 4. Run image and containing application # 5. Compare size of the final image
Video4: Go Channels
Running applications in loop by using Go channels.
In this tutorial video, we review entry point of a web application that runs in loop and react to several input signals by using Go channels.
Questions or Suggestions?
Find me on Twitter and Instagram as @CoderVlogger
By Kanan Rahimov