Go, commonly referred to as golang, is a programming language initially developed at Google in 2007. This book helps you to get started with Go programming. It describes all the elements of the language and illustrates their use with code examples. The following is highlight topics in this book:
* Development Environment
* Go Programming Language
* Arrays, Slices and Maps
* Functions
* Pointers
* Structs and Methods
* String Operations
* File Operations
* Error Handling and Logging
* Building Own Go Package
* Concurrency
* Encoding
* Hashing and Cryptography
* Database Programming
* Socket Programming
AI Reading Assistant
Whole-book reading guide from stratified index samples; jump to passages in the text
Tip the Site
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat Pay
Alipay
Open WeChat or Alipay and scan. No login required.
AI guide
【One-Line Pitch】
A hands-on, example-first introduction to Go for programmers who want to get productive quickly: every concept is demonstrated with a short, runnable program you can build and run yourself. Best for developers new to Go who already know at least one programming language and prefer learning by typing code rather than reading theory.
【Book Arc】
- **Opening (~0%–11%)**: Sets up the Go toolchain and environment (installing Go, PATH/GOPATH configuration, editor choices like vim, nano, IntelliJ IDEA, Sublime), then introduces core language basics — variables, comments, math functions, decisions, loops, and break/continue.
- **Early (~11%–28%)**: Moves into data structures and functions: arrays (including 2D), maps, simple and multi-return functions, variadic parameters, closures, and recursion (Fibonacci).
- **Middle (~28%–44%)**: Covers pointers and a from-scratch singly linked list, structs and methods (with a Circle geometry example), and string operations — concatenation, parsing with Split, case conversion, length, slicing, and numeric-to-string conversion.
- **Late (~44%–61%)**: Shifts to practical I/O and engineering topics: file read/write with the io/ioutil packages, error handling and logging (defer, panic, recover, log package), and building your own Go package/module using GOPATH layout.
- **Ending (~61%–100%)**: Advanced applied topics — concurrency (goroutines, synchronization with locks, channels), encoding (Base64, hex, JSON, XML, CSV), hashing and cryptography (MD5, SHA256, HMAC, symmetric/asymmetric crypto), database programming, and socket programming.
【Key Takeaways】
- **Go basics are taught through runnable mini-projects** (Opening): variables, conditionals, loops, and math are each paired with a folder-based demo (e.g., mathdemo) you build and run with `go build` / `go run`.
- **Collections and functions form the early core** (Early): arrays, maps, multi-return functions, variadic parameters, closures, and recursion are all illustrated with complete code, making this section the language's practical foundation.
- **Pointers unlock data structures** (Middle): the book uses a singly linked list built from scratch to show how pointers and structs combine into real structures, not just syntax.
- **Structs and methods model real objects** (Middle): a Circle example demonstrates defining methods, computing area/circumference, and mutating state via moveTo.
- **String handling is treated as a practical toolkit** (Middle): concatenation, Split-based parsing, case conversion, slicing, and numeric conversion are shown as everyday operations.
- **File I/O and error handling are the bridge to real programs** (Late): reading/writing files with ioutil, plus defer/panic/recover and the log package, move you beyond toy examples.
- **Packaging is explained via GOPATH layout** (Late): creating reusable modules and importing them (simplemodule/simplemoduletest) teaches project organization.
- **Concurrency is the book's advanced centerpiece** (Ending): goroutines, mutex-based synchronization, and channels are demonstrated with background tasks and shared-state examples.
- **Applied domains round out the book** (Ending): encoding formats, hashing/cryptography, database access, and socket programming show Go's use beyond the language itself.
【Reading Tips】
- **Skim the environment setup** (Opening) if you already have Go installed; focus instead on the language chapters where the real learning happens.
- **Type and run every example** — this is an example-driven book, and the value comes from executing the code, not just reading it.
- **Deep-read concurrency and packaging** (Late/Ending): these are the hardest and most transferable topics; the goroutine/lock examples deserve careful tracing.
- **Treat the applied chapters (encoding, crypto, database, sockets) as a menu** — read the ones relevant to your work rather than linearly.
- **Watch for GOPATH-era conventions**: the packaging chapter reflects older Go tooling, so cross-check against modern Go modules if you're on a recent version.
【Coverage Limits】
This guide is based on stratified excerpts covering the book's table of contents and sample code through the concurrency chapter; the database and socket programming chapters are listed but their detailed content is not covered in the excerpts. Specific figures, outputs, and some chapter subsections are not fully represented.
Page 12
n add GO installation path, for instance my Go installation path is c:/go/bin, into PATH variable on Environment Variables. 1.2 Development Tools Basically,...
e a singly linked list from scratch. You can read your Data Structure book to understand what singly linked list is. You also read it on Wikipedia, http://en...
ultiply(5,3) fmt.Printf("multiply()=%d\n",c) } Save all. Now you can compile and run this program. $ cd simplemathtest $ go build $ go run main.go You can se...
\n",newEmp.Email) fmt.Printf("CountryCode: %s\n",newEmp.Country.CountryCode) fmt.Printf("CountryName: %s\n",newEmp.Country.CountryName) 12.6 CSV The last dem...
ey := "this is key 1234" message := "Hello world, go!" encrypted := encrypt_symmetric_crpyto(key,message) This code will generate two files, private.rsa.key...
if err != nil { fmt.Println("Error reading:", err.Error()) } fmt.Println("Received: ",string(buff[:msgLen])) conn.Close() } It uses port 9982. You can change...
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.
Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat PayAlipay
Open WeChat or Alipay and scan. No login required.
Add Tag
Enter tag name (max 50 characters)
Share E-Book
Go Programming by Example (Agus Kurniawan)(Z-Library) (1)
Scan QR code with your phone to access
Copy the link or scan the QR code to access this e-book on your phone
Share E-Book via Email
Please enter email address
Donation Statistics
¥.00
Total Donations
0
Donation Count
Go Programming by Example (Agus Kurniawan)(Z-Library) (1)
Find Your Favorite Books
Only registered users can comment after logging in. Comments need to be reviewed by administrators before being displayed
Loading comments...
Reply to Comment
Edit Comment