voidlogic
Joined 14 years ago
Karma
3,297
Submissions
1,171
Member since
Nov 15
Joined 14 years ago
That being said, developers often have a bit of learning to get there, but that can greatly be accelerated by good team/mentor code review and discussion.
package main
import (
"crypto/sha1"
"hash"
"sync"
)
func main() {
hasher := getHasher()
defer poolHasher(hasher)
}
var hasherPool sync.Pool = sync.Pool{
New: func() interface{} {
return sha1.New()
},
}
func getHasher() hash.Hash {
return hasherPool.Get().(hash.Hash)
}
func poolHasher(hasher hash.Hash) {
hasher.Reset()
hasherPool.Put(hasher)
}I thought you could test for bacterial nuclear material in the blood?
Edit found it: Its a PCR Assay: https://www.ncbi.nlm.nih.gov/pubmed/26469112
The parallel reddit thread seems to agree too: https://www.reddit.com/r/golang/comments/biexq0/go_113_xerro...