mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-18 10:55:25 +00:00
17 lines
352 B
Go
17 lines
352 B
Go
|
|
package requests
|
||
|
|
|
||
|
|
import (
|
||
|
|
"fmt"
|
||
|
|
"strings"
|
||
|
|
)
|
||
|
|
|
||
|
|
func newReplacer(values map[string]interface{}) *strings.Replacer {
|
||
|
|
var replacerItems []string
|
||
|
|
for k, v := range values {
|
||
|
|
replacerItems = append(replacerItems, fmt.Sprintf("{{%s}}", k))
|
||
|
|
replacerItems = append(replacerItems, fmt.Sprintf("%s", v))
|
||
|
|
}
|
||
|
|
|
||
|
|
return strings.NewReplacer(replacerItems...)
|
||
|
|
}
|