pkg/httpx/form: Remove unuused fields
This commit is contained in:
parent
d235ee4e5c
commit
8af2213d5a
2 changed files with 29 additions and 23 deletions
19
pkg/pools/bpool.go
Normal file
19
pkg/pools/bpool.go
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
package pools
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"sync"
|
||||
)
|
||||
|
||||
var builders = sync.Pool{
|
||||
New: func() any { return new(strings.Builder) },
|
||||
}
|
||||
|
||||
func GetBuilder() *strings.Builder {
|
||||
return builders.Get().(*strings.Builder)
|
||||
}
|
||||
|
||||
func ReleaseBuilder(builder *strings.Builder) {
|
||||
builder.Reset()
|
||||
builders.Put(builder)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue