code: func (c *EndpointConfig) regexMatchAndReplace(regex *regexp.Regexp, src, repl string) string {
  	if strings.Contains(repl, "$") {
  		return regex.ReplaceAllString(src, repl)
  	}
  	return repl
  }
docs: //regexMatchAndReplace if 'repl' has $ then perform regex.ReplaceAllString otherwise return 'repl'