You've already forked openaccounting-server
forked from cybercinch/openaccounting-server
- Add GORM v1.25.12 with MySQL and SQLite drivers - Add Viper v1.19.0 for configuration management - Add UUID package for GORM model IDs - Update vendor directory with new dependencies - Update Go module requirements and checksums 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
20 lines
345 B
Go
20 lines
345 B
Go
package schema
|
|
|
|
import (
|
|
"reflect"
|
|
"sync"
|
|
)
|
|
|
|
// sync pools
|
|
var (
|
|
normalPool sync.Map
|
|
poolInitializer = func(reflectType reflect.Type) FieldNewValuePool {
|
|
v, _ := normalPool.LoadOrStore(reflectType, &sync.Pool{
|
|
New: func() interface{} {
|
|
return reflect.New(reflectType).Interface()
|
|
},
|
|
})
|
|
return v.(FieldNewValuePool)
|
|
}
|
|
)
|