DEV Community

Go 1.26 Cheat Sheet (opens in new tab)

This cheat sheet is based on Go 1.26. Table of Contents Program structure Variables, constants, and types Control flow Functions Arrays, slices, and maps Structs, methods, and tags Interfaces Errors Goroutines, channels, and synchronization Context Generics Iterators Testing Standard-library quick reference Tips and common mistakes Modules and packages Further reading Program structure package main // Every executable must be in package main. import ( "fmt" "os" ) func main() { fmt.Println("H...

Read the original article
Sign in to keep reading the full article.

Keyboard Shortcuts

Navigation

Next / previous post
j/k
Open post
oorEnter
Preview post
v

Post Actions

Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Save / unsave
s

Recommendations

Add interest / feed
Enter
Not interested
x

Go to

Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Discover
gb
Search
/

General

Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help