func TrimRight(s, cutset string) string
package main import ( "fmt" "strings" ) func main() { fmt.Print(strings.TrimRight("@@@Hello, Gophers!!!", "!@")) } // Output: // @@@Hello, Gophers