Skip to main content

Menu

LEVEL 0
0/5 XP
HomeAboutTopicsPricingMy VaultStats

Categories

πŸ€– Artificial Intelligence
☁️ Cloud and Infrastructure
πŸ’Ύ Data and Databases
πŸ’Ό Professional Skills
🎯 Programming and Development
πŸ”’ Security and Networking
πŸ“š Specialized Topics
HomeAboutTopicsPricingMy VaultStats
LEVEL 0
0/5 XP
GitHub
Β© 2026 CheatGridβ„’. All rights reserved.
Privacy PolicyTerms of UseAboutContact

GO Programming Language Cheat Sheet

GO Programming Language Cheat Sheet

Back to Programming Languages
Updated 2026-04-28
Next Topic: Java Cheat Sheet

Go (Golang) is a statically typed, compiled programming language designed at Google by Robert Griesemer, Rob Pike, and Ken Thompson. At version 1.26 (February 2026), it features built-in concurrency primitives, fast compilation, and the new Green Tea garbage collector, making it ideal for scalable network services, cloud infrastructure, and CLI tools. The language favors composition over inheritance, explicit error handling, and β€” since Go 1.18 β€” generics with type parameters. Understanding Go's approach to concurrency through goroutines and channels, combined with a growing standard library including the slices, maps, cmp, and iter packages, enables developers to write efficient programs that compile to self-contained binaries.

What This Cheat Sheet Covers

This topic spans 37 focused tables and 298 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.

Table 1: Basic Types and DeclarationsTable 2: Variable Declaration and InitializationTable 3: Constants and EnumerationsTable 4: Operators and ExpressionsTable 5: Control FlowTable 6: FunctionsTable 7: PointersTable 8: Arrays and SlicesTable 9: slices Package Functions (Go 1.21+)Table 10: MapsTable 11: maps Package Functions (Go 1.21+)Table 12: StructsTable 13: MethodsTable 14: InterfacesTable 15: Error HandlingTable 16: Goroutines and ConcurrencyTable 17: ChannelsTable 18: Select StatementTable 19: Context PackageTable 20: Strings and RunesTable 21: Type Conversions and AssertionsTable 22: cmp Package (Go 1.21+)Table 23: Packages and ImportsTable 24: Modules and Dependency ManagementTable 25: TestingTable 26: JSON HandlingTable 27: File I/OTable 28: HTTP Client and ServerTable 29: Time PackageTable 30: Regular ExpressionsTable 31: Command-Line FlagsTable 32: Database OperationsTable 33: ReflectionTable 34: Generics (Go 1.18+)Table 35: iter Package and Range Iterators (Go 1.23+)Table 36: Build Tags and CompilationTable 37: Performance and Profiling

Table 1: Basic Types and Declarations

TypeExampleDescription
bool
var flag bool = true
β€’ Boolean value, either true or false
β€’ zero value is false.
int, int8, int16, int32, int64
var count int = 42
β€’ Signed integers
β€’ int is platform-dependent (32 or 64 bit), others are fixed-size.
uint, uint8, uint16, uint32, uint64
var age uint8 = 25
β€’ Unsigned integers
β€’ uint8 is alias for byte, commonly used for raw data.
float32, float64
var pi float64 = 3.14159
β€’ Floating-point numbers
β€’ prefer float64 for most use cases due to precision.
string
var name string = "Go"
β€’ Immutable UTF-8 byte sequence
β€’ length is byte count, not character count.

More in Programming Languages

  • Functional Programming Cheat Sheet
  • Java Cheat Sheet
  • Arrays & Strings Cheat Sheet
  • Julia Programming Language Cheat Sheet
  • Python Libraries Cheat Sheet
  • TOML Configuration Format Cheat Sheet
View all 31 topics in Programming Languages