Directories ¶
Path | Synopsis |
---|---|
2016
|
|
go-suffixarray/src
Go suffixarray sample - basic usage of creation and lookup.
|
Go suffixarray sample - basic usage of creation and lookup. |
2018
|
|
go-copying-mutex
Pointer receiver properly referring to mutex.
|
Pointer receiver properly referring to mutex. |
goadt
Parser and evaluator for a simple calculator with variables.
|
Parser and evaluator for a simple calculator with variables. |
threadoverhead
Ping ponging messages between two goroutines on a channel, measuring number of messages sent per second.
|
Ping ponging messages between two goroutines on a channel, measuring number of messages sent per second. |
2019
|
|
aes-encrypt-file
Sample of encrypting and decrypting a buffer with crypto/aes.
|
Sample of encrypting and decrypting a buffer with crypto/aes. |
github-hook-google-cloud-function
Simple payload server for Github hooks.
|
Simple payload server for Github hooks. |
go-check-interface
Basic example that demonstrates a type that doesn't implement an interface being flagged for a compile error when assigned to the interface.
|
Basic example that demonstrates a type that doesn't implement an interface being flagged for a compile error when assigned to the interface. |
gohttpconcurrency
This is a basic server that has race conditions.
|
This is a basic server that has race conditions. |
gojsoncookbook
Decoding arbitrary nested maps from JSON using generic interface{}s.
|
Decoding arbitrary nested maps from JSON using generic interface{}s. |
loopvar-goroutine
Closure capture of loop variables, forcing by-value capture with ii.
|
Closure capture of loop variables, forcing by-value capture with ii. |
rwlocks
Implementation of several read-write locks in Go.
|
Implementation of several read-write locks in Go. |
xml-stream
An example streaming XML parser using encoding/xml.
|
An example streaming XML parser using encoding/xml. |
2020
|
|
go-json-complex-types
Sample code for unmarshaling complex JSON structures into Go structs, using several approaches.
|
Sample code for unmarshaling complex JSON structures into Go structs, using several approaches. |
go-json-optional-fields
Custom unmarshaling of a JSON type to a map, in order to set defaults to missing keys.
|
Custom unmarshaling of a JSON type to a map, in order to set defaults to missing keys. |
go-testing-flags
Splitting flag parsing to a self contained function returning a Config.
|
Splitting flag parsing to a self contained function returning a Config. |
tcp-server-shutdown/shutdown1
Socket server that can be shut down -- stop serving, in a graceful manner.
|
Socket server that can be shut down -- stop serving, in a graceful manner. |
tcp-server-shutdown/shutdown2
Socket server that can be shut down -- stop serving, in a graceful manner.
|
Socket server that can be shut down -- stop serving, in a graceful manner. |
2021
|
|
go-generic-slice
Examples of writing concrete (non-generic) functions on slices.
|
Examples of writing concrete (non-generic) functions on slices. |
go-life-http-request
Basic server using the default mux.
|
Basic server using the default mux. |
tls
Simple HTTPS client in Go with mTLS.
|
Simple HTTPS client in Go with mTLS. |
tlssocket
TLS socket dialer, showing certificate chain of server.
|
TLS socket dialer, showing certificate chain of server. |
Click to show internal directories.
Click to hide internal directories.