From the Go Systems Programming book, and my book notes.
- Commandline Param
-i
- Illustrative Functions
- Deferred Functions
- Pointer Basics
- Converting an Array to a Map
- Data Structures
- Interface / Duck Typing
- Random Numbers
- Add Commandline Args
- Function Error Handling
- Logging
- Add Commandline Args (Improved!)
- Regular Expressions
- Read Column in Data
- Column Summary
- Occurrences
- Find and Replace
- Reflection
- Unreachable Code
go tool vet unreachable.go
- Sorting Slices
- Runtime
- A Simple Package
go install aSimplePackage
- Using A Simple Package
- Using The MySQL Package
go get github.com/go-sql-driver/mysql
- Garbage Collection
- Using Command-Line Flags
go run usingFlag.go -o -c -k 5
- Symbolic Links
go run symbLink.go /etc
- pwd(1)
go run pwd.go -P
- which(1)
go run which.go ls
to show the firstgo run which.go -a ls
to show allgo run which.go -s ls && echo $?
to print the exit codego run which.go -s butts && echo $?
to print the exit code
- permissions
go run permissions.go ~
- rm
go run rm.go 123