Intermediate Vocabulary #golang #goroutines #channels #interfaces

Go (Golang) Vocabulary

5 exercises — goroutines vs threads, channels and the Go concurrency model, defer/panic/recover, implicit interface satisfaction, and idiomatic error wrapping with %w.

0 / 5 completed
Go-specific English vocabulary reference
  • goroutine — lightweight concurrent function; go func(); ~2 KB initial stack
  • channel — typed conduit between goroutines; ch := make(chan T); send ch <- v, receive v := <-ch
  • defer — schedules a call to run when the surrounding function returns (LIFO order)
  • implicit interface — no implements keyword; a type satisfies an interface by having the required methods
  • error wrappingfmt.Errorf("context: %w", err); chain inspected by errors.Is() / errors.As()
1 / 5
A Go developer says: "We use goroutines for all the network calls." A colleague unfamiliar with Go asks what a goroutine is. What is the correct explanation?