From 7f60dd79eecde2dbd86ef6f2562e2360baafd975 Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Sat, 20 Oct 2018 15:52:41 +0200 Subject: [PATCH] sync: implement dummy sync.Pool for fmt --- src/sync/pool.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/sync/pool.go diff --git a/src/sync/pool.go b/src/sync/pool.go new file mode 100644 index 00000000..11181f1f --- /dev/null +++ b/src/sync/pool.go @@ -0,0 +1,16 @@ +package sync + +// Pool is a very simple implementation of sync.Pool. It does not actually +// implement a pool. +type Pool struct { + New func() interface{} +} + +// Get returns the value of calling Pool.New(). +func (p *Pool) Get() interface{} { + return p.New() +} + +// Put drops the value put into the pool. +func (p *Pool) Put(x interface{}) { +}