code: func PreparePathComponent(s string) string {
  	s = re.ReplaceAllLiteralString(s, "_")
  	return strings.Replace(s, ".", "_", -1)
  }
docs: // PreparePathComponent cleans string to be used as Graphite metric path.