GO Study Guide 2026
Everything you need to pass the GO exam in one place: the exam format, every topic to study, real practice questions with explanations, flashcards, and full-length practice tests. Free, no sign-up needed.
📋 GO Exam Format at a Glance
📚 GO Topics to Study (21)
✍️ Sample GO Questions & Answers
1. What command runs all tests in the current Go module?
`go test ./...` recursively runs all test files in the current module, with `./...` matching all packages.
2. Which package is used to create and handle errors in Go?
The `errors` package in Go provides fundamental interfaces and functions for error handling. Specifically, `errors.New` is used to create a simple error message. While `fmt` can format error messages and `log` can output them, `errors` is the dedicated package for defining and working with error types.
3. What does `t.Run(name, func)` provide in Go testing?
`t.Run` creates a named subtest, enabling structured test output, independent `-run` filtering, and parallel subtests via `t.Parallel()`.
4. When should you prefer a pointer receiver over a value receiver for a Go method?
Pointer receivers are preferred when the method modifies the struct or when copying the struct would be expensive due to its size.
5. What naming convention determines if a Go identifier is exported from a package?
In Go, identifiers starting with an uppercase letter are exported (public), while lowercase identifiers are unexported (package-private).
6. Why is `chan struct{}` preferred over `chan bool` for signaling in Go?
`struct{}` is an empty type with zero size, so a `chan struct{}` uses no memory for the values themselves, making it the most efficient signal channel.