本站源代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
306B

  1. // +build !go1.3
  2. package quotedprintable
  3. import "bytes"
  4. var ch = make(chan *bytes.Buffer, 32)
  5. func getBuffer() *bytes.Buffer {
  6. select {
  7. case buf := <-ch:
  8. return buf
  9. default:
  10. }
  11. return new(bytes.Buffer)
  12. }
  13. func putBuffer(buf *bytes.Buffer) {
  14. buf.Reset()
  15. select {
  16. case ch <- buf:
  17. default:
  18. }
  19. }
上海开阖软件有限公司 沪ICP备12045867号-1