open-vault/builtin/logical/postgresql/query.go

16 lines
246 B
Go
Raw Normal View History

2015-04-19 01:09:33 +00:00
package postgresql
import (
"fmt"
"strings"
)
// Query templates a query for us.
func Query(tpl string, data map[string]string) string {
for k, v := range data {
tpl = strings.ReplaceAll(tpl, fmt.Sprintf("{{%s}}", k), v)
2015-04-19 01:09:33 +00:00
}
return tpl
}