Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Go: check if a string ends with a substring #golang
package main
import (
"strings"
)
func main() {
strings.HasSuffix("foobar", "bar") // true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment