Dev Skills
Go·Section 10 of 15 · 7 lessons · about 6 h 15 min

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.

  1. 01Project 1 — URL shortener: what we are building
    The plan, the endpoints, and the data before a single line of Go.
  2. 02Step 1 — Set up the project
    The module, the folders, and one route that proves it runs.
  3. 03Step 2 — The store, in memory
    Somewhere to keep links, so you can build the API before adding a database.
  4. 04Step 3 — Creating a short link
    Validate the URL you are given, generate a code, and store it.
  5. 05Step 4 — The redirect
    The one endpoint the whole product exists for.
  6. 06Step 5 — Swap memory for Postgres
    The same API, now with data that survives a restart. The service and handlers do not change.
  7. 07Step 6 — List, delete, and finish the project
    The remaining endpoints, then shutdown, tests and a container.