sync: implement dummy sync.Pool for fmt
Этот коммит содержится в:
родитель
19f7927515
коммит
7f60dd79ee
1 изменённых файлов: 16 добавлений и 0 удалений
16
src/sync/pool.go
Обычный файл
16
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{}) {
|
||||||
|
}
|
Загрузка…
Создание таблицы
Сослаться в новой задаче