Questions

Go questions

Choose a question page, learn the concept, then test your understanding with a quiz.

Understanding "does not implement interface" with Pointer Receivers in Go

Learn why Go shows "does not implement interface" with pointer receivers, how method sets work, and how to fix common interface errors.

gopointersmethodsinterface

Understanding GOPATH and GOROOT in Go

Learn what GOPATH and GOROOT mean in Go, how they differ, and how to fix package not found errors during installation.

gogopath

Understanding Import Cycle Not Allowed in Go

Learn how to read and fix the Go "import cycle not allowed" error with clear examples, dependency tracing, and refactoring tips.

go

Understanding rune in Go: Characters, Unicode, and Case Swapping

Learn what a rune is in Go, how it differs from byte, and how rune comparisons work in case-swapping examples.

goterminologyrune

Understanding the "go.mod file not found" Error in Go Modules

Learn why Go shows "go.mod file not found" and how to fix it in Go 1.16+ using modules, go mod init, and proper project setup.

golinux

What Is the Zero Value of time.Time in Go?

Learn the zero value of time.Time in Go, why nil does not work, and how to check and use zero dates correctly in Go code.

gotimenull

When Does init() Run in Go? Package Initialization Explained

Learn exactly when Go's init() runs, how package variables are initialized, and what happens before main() starts.

goinit

Why Go Cannot Convert []T to []interface{} Implicitly

Learn why Go does not convert []T to []interface{} automatically, how slice memory differs, and the correct way to convert slices safely.

gogo-reflectgo-interface

Why Go Compiles So Quickly: Understanding Go Build Speed

Learn why Go compiles so fast, including language design, compiler choices, package caching, and how Go build speed compares to others.

goperformancebuildcompiler-construction

Why Go Does Not Have a Built-In Set Type: Understanding Sets with Maps in Go

Learn why Go has no built-in set type and how to implement sets using maps, with examples, trade-offs, and beginner-friendly guidance.

godata-structuresset

Why Go Struct to JSON Returns Empty Object {}: Exported Fields and json.Marshal

Learn why Go json.Marshal returns {} for structs with unexported fields, and how to fix it using exported field names and JSON tags.

gojson

json.Unmarshal vs json.NewDecoder.Decode in Go

Learn when to use json.Unmarshal or json.NewDecoder.Decode in Go for HTTP responses, memory usage, streaming, and safer JSON handling.

gojson

Page 6 of 6 - 112 questions