Fix #117: Implement email alerts

This commit is contained in:
TwiN committed 2021-12-02 21:05:17 -05:00
1 parent 0331c18401
commit f6336eac4e
53 files changed
+3062 -626

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
// +build go1.3
package quotedprintable
import (
"bytes"
"sync"
)
var bufPool = sync.Pool{
New: func() interface{} {
return new(bytes.Buffer)
},
}
func getBuffer() *bytes.Buffer {
return bufPool.Get().(*bytes.Buffer)
}
func putBuffer(buf *bytes.Buffer) {
if buf.Len() > 1024 {
return
}
buf.Reset()
bufPool.Put(buf)
}