BufPool Placeholders
This commit is contained in:
parent
ab9e5c89bd
commit
ce65125ade
1 changed files with 2 additions and 2 deletions
|
@ -5,7 +5,6 @@
|
||||||
package strmangle
|
package strmangle
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"math"
|
"math"
|
||||||
"regexp"
|
"regexp"
|
||||||
|
@ -250,7 +249,8 @@ func PrefixStringSlice(str string, strs []string) []string {
|
||||||
// For example, ($1, $2, $3), ($4, $5, $6) etc.
|
// For example, ($1, $2, $3), ($4, $5, $6) etc.
|
||||||
// It will start counting placeholders at "start".
|
// It will start counting placeholders at "start".
|
||||||
func Placeholders(count int, start int, group int) string {
|
func Placeholders(count int, start int, group int) string {
|
||||||
var buf bytes.Buffer
|
buf := GetBuffer()
|
||||||
|
defer PutBuffer(buf)
|
||||||
|
|
||||||
if start == 0 || group == 0 {
|
if start == 0 || group == 0 {
|
||||||
panic("Invalid start or group numbers supplied.")
|
panic("Invalid start or group numbers supplied.")
|
||||||
|
|
Loading…
Add table
Reference in a new issue