Test yourself under real exam conditions: 50 timed questions, 60 on the clock, pass mark 70%%. Instant score with a full review of everything you got wrong. Free — no account needed.
Exam details
Go is an open-source programming language developed at Google by Robert Griesemer, Rob Pike, and Ken Thompson. It is statically typed, compiled, and designed for simplicity, concurrency, and performance.
You can declare variables using:var x int = 10var y = "hello" (type inferred)z := 42 (short declaration, only inside functions)
A goroutine is a lightweight thread managed by the Go runtime. You start one with the go keyword:go myFunction()
Goroutines are multiplexed onto OS threads and are extremely cheap to create (only a few KB of stack).
Use the make function:ch := make(chan int) — unbufferedch := make(chan string, 5) — buffered with capacity 5
Channels are used to communicate between goroutines safely.
Unbuffered channels block the sender until the receiver is ready, and vice versa — they provide synchronization.
Buffered channels allow sending up to their capacity without blocking. The sender only blocks when the buffer is full.