0% found this document useful (0 votes)
10 views2 pages

Golan

Go by Example is a hands-on introduction to the Go programming language, featuring annotated example programs for various concepts and features. It covers a wide range of topics including basic syntax, data structures, concurrency, and file handling. Users are encouraged to refer to the official documentation and upgrade to the latest version of Go for the best experience.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views2 pages

Golan

Go by Example is a hands-on introduction to the Go programming language, featuring annotated example programs for various concepts and features. It covers a wide range of topics including basic syntax, data structures, concurrency, and file handling. Users are encouraged to refer to the official documentation and upgrade to the latest version of Go for the best experience.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

11/03/2025, 21:00 Go by Example

Go by Example
Go is an open source programming language designed for
building scalable, secure and reliable software. Please read
the official documentation to learn more.

Go by Example is a hands-on introduction to Go using


annotated example programs. Check out the first example
or browse the full list below.

Unless stated otherwise, examples here assume the latest


major release Go and may use new language features. Try
to upgrade to the latest version if something isn't working.

Hello World
Values
Variables
Constants
For
If/Else
Switch
Arrays
Slices
Maps
Functions
Multiple Return Values
Variadic Functions
Closures
Recursion
Range over Built-in Types
Pointers
Strings and Runes
Structs
Methods
Interfaces
Enums
Struct Embedding
Generics
Range over Iterators
Errors
Custom Errors
Goroutines
Channels
Channel Buffering
Channel Synchronization
Channel Directions
Select
Timeouts
Non-Blocking Channel Operations
https://gobyexample.com 1/2
11/03/2025, 21:00 Go by Example

Closing Channels
Range over Channels
Timers
Tickers
Worker Pools
WaitGroups
Rate Limiting
Atomic Counters
Mutexes
Stateful Goroutines
Sorting
Sorting by Functions
Panic
Defer
Recover
String Functions
String Formatting
Text Templates
Regular Expressions
JSON
XML
Time
Epoch
Time Formatting / Parsing
Random Numbers
Number Parsing
URL Parsing
SHA256 Hashes
Base64 Encoding
Reading Files
Writing Files
Line Filters
File Paths
Directories
Temporary Files and Directories
Embed Directive
Testing and Benchmarking
Command-Line Arguments
Command-Line Flags
Command-Line Subcommands
Environment Variables
Logging
HTTP Client
HTTP Server
Context
Spawning Processes
Exec'ing Processes
Signals
Exit

by Mark McGranaghan and Eli Bendersky | source | license

https://gobyexample.com 2/2

You might also like