Go Recipes: Difference between revisions
Jump to navigation
Jump to search
Line 35: | Line 35: | ||
<blockquote style="background-color: AliceBlue; border: solid thin LightSteelBlue;"> | <blockquote style="background-color: AliceBlue; border: solid thin LightSteelBlue;"> | ||
* Unbuffered channel: [https://github.com/NovaOrdis/playground/blob/master/go/concurrency/unbuffered-channel.go playground/go/concurrency/unbuffered-channel.go] | * Unbuffered channel: [https://github.com/NovaOrdis/playground/blob/master/go/concurrency/unbuffered-channel.go playground/go/concurrency/unbuffered-channel.go] | ||
* | * Using a <tt>waitGroup</tt> to wait for goroutines to finish before exiting <tt>main()</tt>: [https://github.com/NovaOrdis/playground/blob/master/go/concurrency/waitGroup.go playground/go/concurrency/waitGroup.go] | ||
</blockquote> | </blockquote> | ||
<span id="waitGroup_example"/> | |||
=Logging= | =Logging= |
Revision as of 20:20, 2 April 2016
Internal
Files
- Reading a file with os primitives: playground/go/files/read-file.go
- Readinga file with io/ioutil primitives: playground/go/files/read-file-2.go
- Writing a file with os primitives: playground/go/files/write-file.go
- Writing a file with io/ioutil primitives: playground/go/files/write-file-2.go
- Reading a directory with os primitives: playground/go/files/read-dir.go
- Walking a directory with path/filepath primitives: playground/go/files/walk-dir.go
Network
- TCP client and server with net primitives: playground/go/network/tcp-server.go, playground/go/network/tcp-client.go,
- HTTP server with net/http primitives: playground/go/network/http-server.go
- HTTP client with net/http and ioutil primitives: playground/go/network/http-client.go
- RPC - Introducing Go page 89
Command Line Parsing
Concurrency
- Unbuffered channel: playground/go/concurrency/unbuffered-channel.go
- Using a waitGroup to wait for goroutines to finish before exiting main(): playground/go/concurrency/waitGroup.go