mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-10-31 18:48:08 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			247 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			247 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| 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.Replace(tpl, fmt.Sprintf("{{%s}}", k), v, -1)
 | |
| 	}
 | |
| 
 | |
| 	return tpl
 | |
| }
 | 
