... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
| package main | |
| import ( | |
| "fmt" | |
| "time" | |
| ) | |
| // Suggestions from golang-nuts | |
| // http://play.golang.org/p/Ctg3_AQisl |
| import "bytes" | |
| func StreamToByte(stream io.Reader) []byte { | |
| buf := new(bytes.Buffer) | |
| buf.ReadFrom(stream) | |
| return buf.Bytes() | |
| } | |
| func StreamToString(stream io.Reader) string { | |
| buf := new(bytes.Buffer) |
... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048
# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)| // To the extent possible under law, the Yawning Angel has waived all copyright | |
| // and related or neighboring rights to orhttp_example, using the creative | |
| // commons "cc0" public domain dedication. See LICENSE or | |
| // <http://creativecommons.org/publicdomain/zero/1.0/> for full details. | |
| package main | |
| import ( | |
| // Things needed by the actual interface. | |
| "golang.org/x/net/proxy" |