Project 1 — URL shortener in Go (Golang)
Optional — after you finish the basics. Built with a layered structure: a folder per kind of code. Validation, storage, a redirect, then Postgres and a container.
- 01Project 1 — URL shortener: what we are buildingThe plan, the endpoints, and the data before a single line of Go.
- 02Step 1 — Set up the projectThe module, the folders, and one route that proves it runs.
- 03Step 2 — The store, in memorySomewhere to keep links, so you can build the API before adding a database.
- 04Step 3 — Creating a short linkValidate the URL you are given, generate a code, and store it.
- 05Step 4 — The redirectThe one endpoint the whole product exists for.
- 06Step 5 — Swap memory for PostgresThe same API, now with data that survives a restart. The service and handlers do not change.
- 07Step 6 — List, delete, and finish the projectThe remaining endpoints, then shutdown, tests and a container.