code: func RightTrim(str, chars string) string {
  	if chars == "" {
  		return strings.TrimRightFunc(str, unicode.IsSpace)
  	}
  	r, _ := regexp.Compile("[" + chars + "]+$")
  	return r.ReplaceAllString(str, "")
  }
docs: // RightTrim trim characters from the right-side of the input.
  // If second argument is empty, it's will be remove spaces.