index.md (8302B)
1 --- 2 title: "Diving into Go: A Five-Week Intro" 3 date: 2014-04-25T00:00:00+00:00 4 draft: false 5 canonical_url: https://www.viget.com/articles/diving-into-go-a-five-week-intro/ 6 --- 7 8 One of my favorite parts of being a developer here at Viget is our 9 [developer book club](https://viget.com/extend/confident-ruby-a-review). 10 We've read [some](http://www.confidentruby.com/) 11 [fantastic](http://www.poodr.com/) 12 [books](http://martinfowler.com/books/nosql.html), but for our most 13 recent go-round, we decided to try something different. A few of us have 14 been interested in the [Go programming language](https://golang.org/) 15 for some time, so we decided to combine two free online texts, [*An 16 Introduction to Programming in Go*](http://www.golang-book.com/books/intro/) and 17 [*Go By Example*](https://gobyexample.com/), plus a few other resources, 18 into a short introduction to the language. 19 [Chris](https://viget.com/about/team/cjones) and 20 [Ryan](https://viget.com/about/team/rfoster) put together a curriculum 21 that I thought was too good not to share with the internet at large. 22 23 ## Week 1 24 25 Chapter 1: [Getting Started](http://www.golang-book.com/books/intro/1) 26 27 - Files and Folders 28 - The Terminal 29 - Text Editors 30 - Go Tools 31 - **Go By Example** 32 - [Hello World](https://gobyexample.com/hello-world) 33 34 Chapter 2: [Your First Program](http://www.golang-book.com/books/intro/2) 35 36 - How to Read a Go Program 37 38 Chapter 3: [Types](http://www.golang-book.com/books/intro/3) 39 40 - Numbers 41 - Strings 42 - Booleans 43 - **Go By Example** 44 - [Values](https://gobyexample.com/values) 45 - [Random Numbers](https://gobyexample.com/random-numbers) 46 - [String Functions](https://gobyexample.com/string-functions) 47 - [String Formatting](https://gobyexample.com/string-formatting) 48 - [Regular 49 Expressions](https://gobyexample.com/regular-expressions) 50 51 Chapter 4: [Variables](http://www.golang-book.com/books/intro/4) 52 53 - How to Name a Variable 54 - Scope 55 - Constants 56 - Defining Multiple Variables 57 - An Example Program 58 - **Go By Example** 59 - [Variables](https://gobyexample.com/variables) 60 - [Constants](https://gobyexample.com/constants) 61 - [Number Parsing](https://gobyexample.com/number-parsing) 62 - [Time](https://gobyexample.com/time) 63 - [Epoch](https://gobyexample.com/epoch) 64 - [Time Formatting / 65 Parsing](https://gobyexample.com/time-formatting-parsing) 66 67 Chapter 5: [Control Structures](http://www.golang-book.com/books/intro/5) 68 69 - For 70 - If 71 - Switch 72 - **Go By Example** 73 - [For](https://gobyexample.com/for) 74 - [If/Else](https://gobyexample.com/if-else) 75 - [Switch](https://gobyexample.com/switch) 76 - [Line Filters](https://gobyexample.com/line-filters) 77 78 Chapter 6: [Arrays, Slices and Maps](http://www.golang-book.com/books/intro/6) 79 80 - Arrays 81 - Slices 82 - Maps 83 - **Go By Example** 84 - [Arrays](https://gobyexample.com/arrays) 85 - [Slices](https://gobyexample.com/slices) 86 - [Maps](https://gobyexample.com/maps) 87 - [Range](https://gobyexample.com/range) 88 - **Blog Posts** 89 - [Go Slices: usage and 90 internals](https://blog.golang.org/go-slices-usage-and-internals) 91 - [Arrays, Slices (and strings): The mechanics of 92 'append'](https://blog.golang.org/slices) 93 94 ## Week 2 95 96 Chapter 7: [Functions](http://www.golang-book.com/books/intro/7) 97 98 - Your Second Function 99 - Returning Multiple Values 100 - Variadic Functions 101 - Closure 102 - Recursion 103 - Defer, Panic & Recover 104 - **Go By Example** 105 - [Functions](https://gobyexample.com/functions) 106 - [Multiple Return 107 Values](https://gobyexample.com/multiple-return-values) 108 - [Variadic Functions](https://gobyexample.com/variadic-functions) 109 - [Closures](https://gobyexample.com/closures) 110 - [Recursion](https://gobyexample.com/recursion) 111 - [Panic](https://gobyexample.com/panic) 112 - [Defer](https://gobyexample.com/defer) 113 - [Collection 114 Functions](https://gobyexample.com/collection-functions) 115 116 Chapter 8: [Pointers](http://www.golang-book.com/books/intro/8) 117 118 - The \* and & operators 119 - new 120 - **Go By Example** 121 - [Pointers](https://gobyexample.com/pointers) 122 - [Reading Files](https://gobyexample.com/reading-files) 123 - [Writing Files](https://gobyexample.com/writing-files) 124 125 ## Week 3 126 127 Chapter 9: [Structs and Interfaces](http://www.golang-book.com/books/intro/9) 128 129 - Structs 130 - Methods 131 - Interfaces 132 - **Go By Example** 133 - [Structs](https://gobyexample.com/structs) 134 - [Methods](https://gobyexample.com/methods) 135 - [Interfaces](https://gobyexample.com/interfaces) 136 - [Errors](https://gobyexample.com/errors) 137 - [JSON](https://gobyexample.com/json) 138 139 Chapter 10: [Concurrency](http://www.golang-book.com/books/intro/10) 140 141 - Goroutines 142 - Channels 143 - **Go By Example** 144 - [Goroutines](https://gobyexample.com/goroutines) 145 - [Channels](https://gobyexample.com/channels) 146 - [Channel Buffering](https://gobyexample.com/channel-buffering) 147 - [Channel 148 Synchronization](https://gobyexample.com/channel-synchronization) 149 - [Channel Directions](https://gobyexample.com/channel-directions) 150 - [Select](https://gobyexample.com/select) 151 - [Timeouts](https://gobyexample.com/timeouts) 152 - [Non-Blocking Channel 153 Operations](https://gobyexample.com/non-blocking-channel-operations) 154 - [Closing Channels](https://gobyexample.com/closing-channels) 155 - [Range over 156 Channels](https://gobyexample.com/range-over-channels) 157 - [Timers](https://gobyexample.com/timers) 158 - [Tickers](https://gobyexample.com/tickers) 159 - [Worker Pools](https://gobyexample.com/worker-pools) 160 - [Rate Limiting](https://gobyexample.com/rate-limiting) 161 162 ## Week 4 163 164 - **Videos** 165 - [Lexical Scanning in 166 Go](https://www.youtube.com/watch?v=HxaD_trXwRE) 167 - [Concurrency is not 168 parallelism](https://blog.golang.org/concurrency-is-not-parallelism) 169 - Blog Posts 170 - [Share Memory By 171 Communicating](https://blog.golang.org/share-memory-by-communicating) 172 - [A GIF decoder: an exercise in Go 173 interfaces](https://blog.golang.org/gif-decoder-exercise-in-go-interfaces) 174 - [Error handling and 175 Go](https://blog.golang.org/error-handling-and-go) 176 - [Defer, Panic, and 177 Recover](https://blog.golang.org/defer-panic-and-recover) 178 179 ## Week 5 180 181 Chapter 11: [Packages](http://www.golang-book.com/books/intro/11) 182 183 - Creating Packages 184 - Documentation 185 186 Chapter 12: [Testing](http://www.golang-book.com/books/intro/12) 187 188 Chapter 13: [The Core Packages](http://www.golang-book.com/books/intro/13) 189 190 - Strings 191 - Input / Output 192 - Files & Folders 193 - Errors 194 - Containers & Sort 195 - Hashes & Cryptography 196 - Servers 197 - Parsing Command Line Arguments 198 - Synchronization Primitives 199 - **Go By Example** 200 - [Sorting](https://gobyexample.com/sorting) 201 - [Sorting by 202 Functions](https://gobyexample.com/sorting-by-functions) 203 - [URL Parsing](https://gobyexample.com/url-parsing) 204 - [SHA1 Hashes](https://gobyexample.com/sha1-hashes) 205 - [Base64 Encoding](https://gobyexample.com/base64-encoding) 206 - [Atomic Counters](https://gobyexample.com/atomic-counters) 207 - [Mutexes](https://gobyexample.com/mutexes) 208 - [Stateful 209 Goroutines](https://gobyexample.com/stateful-goroutines) 210 - [Command-Line 211 Arguments](https://gobyexample.com/command-line-arguments) 212 - [Command-Line Flags](https://gobyexample.com/command-line-flags) 213 - [Environment 214 Variables](https://gobyexample.com/environment-variables) 215 - [Spawning Processes](https://gobyexample.com/spawning-processes) 216 - [Exec'ing Processes](https://gobyexample.com/execing-processes) 217 - [Signals](https://gobyexample.com/signals) 218 - [Exit](https://gobyexample.com/exit) 219 220 Chapter 14: [Next Steps](http://www.golang-book.com/books/intro/14) 221 222 - Study the Masters 223 - Make Something 224 - Team Up 225 226 *** 227 228 Go is an exciting language, and a great complement to the Ruby work we 229 do. Working through this program was a fantastic intro to the language 230 and prepared us to create our own Go programs for great justice. Give it 231 a shot and let us know how it goes.