← Theory library
Go theory
The language of geth and most chain infrastructure.
Easy
- 1. Go Toolchain and Modulesgo mod, go run, go build.
- 2. Packages and VisibilityExported names start with a capital letter.
- 3. Variables and Constantsvar, := and typed constants.
- 4. Basic Types and Zero ValuesEvery type has a usable zero value.
- 5. Control Flowif, for and switch.
- 6. Functions and Multiple ReturnsReturning values plus an error.
- 7. Arrays, Slices and AppendSlices are views with length and capacity.
- 8. MapsHash tables with comma-ok lookup.
- 9. Strings, Runes and BytesImmutable UTF-8 byte sequences.
- 10. StructsValue types with named fields.
- 11. PointersReferences without pointer arithmetic.
- 12. Methods and EmbeddingComposition instead of inheritance.
- 13. InterfacesImplicit, small and satisfied by behaviour.
- 14. ErrorsErrors are values.
- 15. defer, panic and recoverCleanup and exceptional exits.
- 16. Packages: fmt, strconv, timeThe everyday standard library.
- 17. Files and io InterfacesReader and Writer everywhere.
- 18. JSON EncodingMarshal, Unmarshal and struct tags.
- 19. Testing in GoThe testing package and table tests.
- 20. Formatting and Lintinggofmt ends style debates.
Medium
- 21. GoroutinesCheap concurrent functions.
- 22. ChannelsTyped pipes for communication.
- 23. select and TimeoutsWaiting on multiple channels.
- 24. sync PackageWaitGroup, Mutex and Once.
- 25. ContextDeadlines, cancellation and request scope.
- 26. Concurrency PatternsWorker pools, fan-in and pipelines.
- 27. HTTP Serversnet/http and handlers.
- 28. HTTP Clients and JSON-RPCCalling blockchain nodes from Go.
- 29. Databases with database/sqlPooling, scanning and transactions.
- 30. Generics in GoType parameters since Go 1.18.
- 31. Reflectionreflect and when to avoid it.
- 32. Struct Design and API StyleOptions, constructors and zero values.
- 33. Modules, Versioning and VendoringSemantic import versioning.
- 34. Logging and ObservabilityStructured logs, metrics and traces.
- 35. Configuration and SecretsFlags, env and safe defaults.
- 36. Building CLIsCommands, flags and exit codes.
- 37. Cross-compilation and DeploymentGOOS, GOARCH and small images.
Hard
- 38. The Memory Model and Race DetectionHappens-before in practice.
- 39. Garbage Collection and PerformanceAllocation, escape analysis and GOGC.
- 40. Profiling with pprofCPU, heap, block and goroutine profiles.
- 41. Go for Blockchain InfrastructureWhy nodes and tooling pick Go.
- 42. go-ethereum as a Libraryethclient, ABI binding and transactions.
- 43. Indexers and Event ProcessingLogs, reorgs and idempotency.
- 44. Cryptography in GoHashes, ECDSA and safe randomness.
- 45. gRPC and ProtobufTyped service contracts.
- 46. Testing Advanced: fakes, golden files, fuzzingConfidence beyond unit tests.
- 47. Graceful Shutdown and ResilienceSignals, draining and retries.
- 48. Security HardeningInput validation and supply chain.
- 49. Architecture for Chain ServicesLayering, queues and idempotency.
- 50. Capstone: A Go Chain Indexer ServiceBringing the track together.