Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Go: check if a string ends with a substring #golang
package main
import (
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