Files
web-core-fr-gp/logger/logger.go
T

15 lines
344 B
Go
Raw Normal View History

2015-06-28 16:54:38 -04:00
package logger
import (
"regexp"
)
var postReg = regexp.MustCompile("(.*(/|id=))[a-zA-Z0-9]{12,13}(.*)")
var tokenReg = regexp.MustCompile("(.*t=)[a-zA-Z0-9]{32}(.*)")
func ScrubID(uri string) string {
curStr := postReg.ReplaceAllString(uri, "$1[scrubbed]$3")
curStr = tokenReg.ReplaceAllString(curStr, "$1[scrubbed]$2")
return curStr
}