You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: sanitize.go
    path of file: ./repos/trickster/vendor/github.com/influxdata/influxql
    
    the code of the file until where you have to start completion: package influxql

import (
	"regexp"
	"strings"
)

var (
	sanitizeSetPassword = regexp.MustCompile(`(?i)password\s+for[^=]*=\s+(["']?[^\s"]+["']?)`)

	san
    
func Sanitize(query string) string {
	if matches := sanitizeSetPassword.FindAllStringSubmatchIndex(query, -1); matches != nil {
		var buf strings.Builder
		i := 0
		for _, match := range matches {
			buf.WriteString(query[i:match[2]])
			buf.WriteString("[REDACTED]")
			i = match[3]
		}
		buf.WriteString(query[i:])
		query = buf.String()
	}

	if matches := sanitizeCreatePassword.FindAllStringSubmatchIndex(query, -1); matches != nil {
		var buf strings.Builder
		i := 0
		for _, match := range matches {
			buf.WriteString(query[i:match[2]])
			buf.WriteString("[REDACTED]")
			i = match[3]
		}
		buf.WriteString(query[i:])
		query = buf.String()
	}
	return query
}