Languages: Python C C++ Go Java Ruby Rust Perl R ← Full TOC
Ch.22 GCC/C Ch.23 C++ Ch.24 Go Ch.25 Java Ch.26 Ruby ← Full TOC

🧡 Chapter 24 — Go Programming Language

Standard Library Packages, Functions & Ready-to-Run Code Examples
Part of The Direct Path to Linux Ubuntu — free for all students and developers.

10Packages
200+Symbols
5Examples
go runRun command
Go 1.22Version
FreeNo login
📄 Open Go Reference 🏠 Go Index Page
📜 Standard Library Packages Covered
📄 fmtPrintf, Println, Sprintf, Scanf…
💻 osOpen, Create, ReadFile, Getenv…
🌊 ioReader, Writer, Copy, ReadAll…
🔤 stringsSplit, Join, Contains, Replace…
🔢 strconvAtoi, Itoa, ParseFloat, FormatInt…
📐 mathSqrt, Pow, Sin, Cos, Log, Pi…
🕐 timeNow, Sleep, Since, Format, Parse…
🌐 net/httpGet, Post, ListenAndServe, HandleFunc…
🔒 syncMutex, WaitGroup, Once, Map…
📚 bufioScanner, NewReader, NewWriter…
🎓 Why Learn Go?

Built-in Concurrency

Goroutines and channels make concurrent programming simple and safe — no threads, no locks needed for most use cases.

🚀

Compiles to Native Binary

Go compiles to a single static binary with no runtime dependencies — deploy anywhere with go build.

📄

Production Web Servers

Docker, Kubernetes, Terraform, and GitHub CLI are all written in Go. The net/http package is production-ready out of the box.

🆕

Fast Compile Times

Go compiles millions of lines in seconds. Simple syntax, strong typing, and built-in formatting with gofmt.

⚡ Quick Run & Build Reference

Every Go program needs a main package and func main():

go run main.go               # run directly (no binary produced)
go build -o myapp main.go    # compile to binary named myapp
go build ./...               # build all packages in project
go test ./...                # run all tests
go fmt ./...                 # format all Go source files
go mod init myproject        # initialize Go module (go.mod)
go get github.com/some/pkg   # add external dependency
go vet ./...                 # run static analysis
./myapp                      # run compiled binary
Previous Home Next