Go Certification Test (Intermediate)
A free 80-minute Go skill test at intermediate level. Pass with 60% to earn a verifiable CodeKairo credential and a profile frame.
- Skill: Go
- Level: Intermediate
- Duration: 80 minutes
- Questions: 27
- Pass mark: 60% (distinction at 85%)
- Credential: Verifiable, valid for 2 years
Go the way production code uses it: the object model, the libraries, the edge cases and the traps — then two problems to solve in Go.
What does the Go (Intermediate) skill test cover?
It certifies that you can read and write Go the way it is used at work. Multiple-choice questions, most built around a short program, examine slice aliasing and append, maps, method sets and interfaces, error wrapping, defer, panic and recover, goroutines and channels, select, sync and context, and generics. Then you solve coding problems from the catalogue in Go, judged on hidden test cases with partial credit.
Sections
| Section | Questions | Time | Kind | Marks each |
|---|---|---|---|---|
| Concepts | 25 | 30 min | Multiple choice | 1 |
| Coding | 2 | 50 min | Coding | 12.5 |
What it covers
- Types, variables & constants — practise with Coding problems, solved in Go
- Control flow — practise with Coding problems, solved in Go
- Functions & closures — practise with Coding problems, solved in Go
- Arrays & slices — practise with Coding problems, solved in Go
- Maps — practise with Coding problems, solved in Go
- Strings, bytes & runes — practise with Coding problems, solved in Go
- Structs & methods — practise with Coding problems, solved in Go
- Interfaces — practise with Coding problems, solved in Go
- Errors, defer, panic & recover — practise with Coding problems, solved in Go
- Goroutines & channels — practise with Coding problems, solved in Go
- sync, select & context — practise with Coding problems, solved in Go
- Generics — practise with Coding problems, solved in Go
The Go (Intermediate) test is for developers who write Go for a living, or are about to. It goes past the syntax into the behaviour that decides whether Go code is correct: what append does when two slices share an array, whether a nil pointer stored in an error compares equal to nil, when a deferred call reads its arguments, and which channel operations block, panic or deadlock. The multiple-choice questions come first, and most of them show a short, complete program and ask what it prints, or whether it compiles at all. Coding problems follow, and you solve them in Go.
Sit it when you can read an unfamiliar Go program and say what it will do before you run it. If you are still getting used to slices, maps and methods, start with the Go (Basic) test; neither level requires the other.
What each topic examines
Questions are drawn evenly across the topics below, so a sitting cannot be all channels and no maps. Each bullet says what you should be able to predict or explain.
- Types, variables and constants. How
iotacounts through aconstblock, how constant arithmetic differs from arithmetic on sized integers at run time, integer division and remainder with negative operands, a defined type against an alias, and what:=declares when the name already exists in an outer scope. - Control flow.
fallthrough, labelledbreakandcontinue, what an unlabelledbreakinside aswitchleaves, and when arangeloop evaluates the thing it ranges over. - Functions and closures. Closures that keep their own state, method values and when they bind their receiver, passing a slice to a variadic parameter with
..., and named results with a barereturn. - Arrays and slices. Two slices over one backing array,
appendand spare capacity, the full slice expressions[low:high:max],copy, and which bounds a slice expression is checked against. Practise on array problems and read the Arrays lesson. - Maps. Passing a map to a function, reading from and writing to a nil map, comma-ok lookups, deleting while ranging, and updating a struct stored as a map value. See the hash table problems and the Hashing lesson.
- Strings, bytes and runes. Byte length against rune count, what
rangeyields over UTF-8, immutability, and howstringsandstrconvbehave at the edges. See the string problems and the Strings lesson. - Structs and methods. Value and pointer receivers, addressability, embedding and promotion, including what a promoted method sees when the outer type has a method of the same name, and what assigning a struct that holds a slice or a pointer copies.
- Interfaces. Method sets and which types satisfy an interface, nil pointers stored in interfaces, type assertions and type switches, and comparing interface values.
- Errors, defer, panic and recover. Wrapping with
%wagainst formatting with%v,errors.Isanderrors.As, when deferred arguments are evaluated, deferred closures and named results, and where a call torecovertakes effect. - Goroutines and channels. Unbuffered hand-offs against buffered queues, closing a channel and receiving from a closed one,
rangeover a channel, directional channel types, and the deadlock the runtime reports when every goroutine is blocked. - sync, select and context.
selectwithdefaultand with nil channels,sync.WaitGroup,sync.Mutexandsync.Once, and how cancellation travels between acontextand the contexts derived from it. - Generics. Type parameters and constraints,
comparable,~in a union, type inference and its limits, and generic types with methods.
How the questions are written
Most questions show a complete program, package main and all, and ask for its output, which was checked by running it on Go 1.19. Nothing depends on what varies from run to run: no question prints a map in iteration order, relies on a scheduling race, or asks for a slice's exact capacity after append has grown it, because the language does not fix any of those. Concurrent programs print one determined result, with values passed through channels in a set order or summed after wg.Wait().
"It does not compile", "It panics" and the runtime's "fatal error: all goroutines are asleep - deadlock!" appear among the options as real answers, not filler. You need to know which mistakes the compiler catches, which survive until run time, and what the runtime does with each, because a wrong program in Go fails in one of those three ways and the questions ask which. A few questions ask you to select every correct option, and only the exact set scores.
The coding problems
The coding problems come from the published catalogue and must be answered in Go. As in the practice workbench, you complete a function whose signature is given and return the answer; the judge supplies the input and runs hidden cases, each case you pass earns its share of the marks, and your best submission per problem stands.
Write for Go 1.19. There are no built-in min and max functions and no slices or maps packages, so sort with sort.Ints, sort.Strings or sort.Slice, and keep a two-line max helper in your head. A priority queue in Go means implementing container/heap's five methods on your own type, which is slow to work out under a clock if you have never done it. Build long output with strings.Builder rather than += in a loop. int is 64 bits on the judge, so most sums are safe, but a product of two large values can still overflow, and Go wraps it without any error.
How to prepare
Predict, then run. For each behaviour in the list above, write a ten-line program, decide what it will print, and only then run it. Most of the surprises in Go come from a handful of rules (slices share arrays, assignment copies, an interface carries a type as well as a value), and seeing each rule break your prediction once is how it sticks.
Solve problems in Go, not in your strongest language. The challenge catalogue takes a Go solution for every problem; the topic hubs order their problems from easy to hard, and a good spread for Go practice is two pointers, sliding window, stack, heap and breadth-first search. The DSA roadmap teaches the techniques behind them, with lessons such as Two Pointers, Sliding Window and Heaps and Priority Queues.
Concurrency has no problem set, so build the shapes yourself: a pipeline of stages joined by channels, a worker pool that waits on a sync.WaitGroup, a loop that stops when a context is cancelled, and a select that drains two channels until both are closed. Run them with the race detector (go run -race), and try the broken versions too: forget a close, pass a WaitGroup by value, lock a mutex twice. Knowing what each failure looks like is part of what the test examines.
Sample question
Topic: Structs & methods
What does this program print?
package main
import "fmt"
type Item struct {
Name string
Qty int
}
func (it *Item) Restock(n int) { it.Qty += n }
func main() {
items := []Item{{"pen", 1}, {"cup", 2}}
for _, it := range items {
it.Restock(10)
}
for i := range items {
items[i].Restock(1)
}
fmt.Println(items)
}[{pen 12} {cup 13}][{pen 1} {cup 2}][{pen 2} {cup 3}]- It does not compile:
Restockneeds a pointer, anditis a value.
Show the answer
C. [{pen 2} {cup 3}]
range copies each element into the loop variable. it.Restock(10) is legal because it is an addressable variable, so Go passes &it — the address of the copy — and the 10 is added to the copy and then thrown away. items[i] names the element in the slice itself, so items[i].Restock(1) changes the slice. To modify elements while ranging, index the slice or keep pointers in it ([]*Item).
Common questions
Do I need to know generics for the Go Intermediate test?
Yes, at a working level. You should be able to write a function with a type parameter, pick a constraint for it, say what comparable allows and what a ~ in a union adds, and recognise when type inference cannot work out a type argument. Generics are one topic among several, so they take a share of each paper rather than most of it.
Which version of Go are the questions and the judge based on?
Go 1.19. The questions stay away from behaviour that changed in later releases, such as the per-iteration loop variables of Go 1.22, so no answer depends on the version you use day to day. In the coding round, the built-in min and max functions and the slices and maps packages, all added in Go 1.21, are not available, so bring small helpers of your own.
Are the concurrency questions about timing and race conditions?
No question depends on how the scheduler happens to interleave goroutines. The programs pass values through channels in a fixed order or add results up after wg.Wait(), and you are asked what they print, whether they panic, or whether they deadlock. Where the language deliberately leaves a choice open, such as which ready case a select takes, the question asks what the language promises.
Should I take the Go Basic test first?
Neither level requires the other. If you are comfortable with slices, maps, structs and simple interfaces but have not yet worked with goroutines, error wrapping or generics, the Go (Basic) test is the better fit for now. If you already write Go at work, start here.
How should I practise for the coding problems in Go?
Solve catalogue problems in Go rather than in your strongest language, because the coding round accepts only Go. Get fluent with what a Go solution reaches for every time: sort.Slice, maps used as sets, strings.Builder, strconv conversions, slices of slices and container/heap. Pasting into the editor is switched off, so practise writing them from memory.
Rules
This is a certification test. Pass with 60% and you earn a verifiable CodeKairo credential — 85% earns it with distinction. It is valid for 2 years.
- The sections are timed separately and taken in order. A section you leave cannot be reopened.
- The server keeps the clock. Closing the tab or reloading does not pause it.
- Your answers save as you go and survive a refresh.
- The coding section must be answered in Go. Run checks the visible cases; Submit runs every hidden case.
- You may sit this test again 7 days after a sitting ends. Your best result stands.
Integrity. Work alone and from what you know, on a laptop or desktop with a webcam — phones and tablets cannot sit a skill test. The test runs full screen and must stay in front the whole time, and the webcam must see you, alone: leaving full screen, switching to another tab or window, minimising, or the camera seeing no one, someone else, a phone or you looking away blurs the paper and counts against you — the first 2 are warnings, and the third ends the sitting, graded as not passed. The camera check runs in your browser; nothing is recorded or uploaded. Pasting into the editor is switched off. A sitting that looks assisted can be reviewed, and a credential earned that way is revoked.
The answers are never shown — not during the test and not after it. Your result breaks the score down by topic and points you to what to practise.