Skip to content

Project exam · Go Programming (backend and cloud)

Project exam: Go backend developer practical

Project examexpert· about 2 hours· 8 steps· 120 min · pass 70%

The brief

A timed, hands-on exam like the practical round of a Go backend interview. In two hours you build a small rail-fare module: a printed bill, a table-driven test, a race fix, a JSON booking API with the right status codes, cross-compiled binaries and a clean vet and coverage run. Each task is checked from the output you paste; no hints or answers are shown until you hand in.

Why it matters

Many Go teams in India now give a take-home or live practical instead of only theory questions: build an endpoint, write a table test, fix a race, ship a binary. Doing it against the clock shows you which parts you can do from memory and which you still look up.

Skills you practise

  • modules and go run
  • switch, functions and errors
  • table-driven tests
  • sync.Mutex and go test -race
  • net/http routing and JSON
  • cross-compiling with GOOS and GOARCH
  • go vet and coverage

You need

  • Go 1.22 or newer installed from go.dev/dl
  • curl and the file command: Git Bash or WSL on Windows, or Linux/macOS
  • For go test -race on Windows: WSL, or a C compiler with CGO_ENABLED=1
  • Two hours without interruptions. You may read the Go documentation (pkg.go.dev), as in most real practical rounds.

What you will have at the end

The example.com/railfare module: a correct bill, a table-driven test, a race-free seat counter, a JSON booking API with correct status codes, cross-compiled binaries, and a clean vet and coverage run.

How it is marked (rubric, 100 points)
Correct resultsThe bill, the fare test cases and the booking totals are right to the paisa.40
HTTP and JSONCorrect routes and status codes (201, 200, 400, 404, 405), JSON bodies and Content-Type on every response.25
Concurrency and testingThe race is fixed properly, tests are table-driven with named cases, and they pass with -race.20
Build and toolingCross-compiled binaries for both targets, gofmt and go vet clean, coverage at 80% or more.15
  • 8tasks
  • 120 mintime limit
  • 70%to pass

Rules: a project exam

  • Do each task on your own machine, then paste the command output into its box here.
  • Work alone, without notes or a search engine, as in the real exam.
  • No hints and no answers. You can run your code, but the checks run only when you hand in.
  • Every task is checked automatically when you hand in, or when the time is up.
  • You see which tasks passed at the end. You can take it again.
Not yet, go back