Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kayabe/02be3a8405bc5663d073a8732fbdc183 to your computer and use it in GitHub Desktop.
Save kayabe/02be3a8405bc5663d073a8732fbdc183 to your computer and use it in GitHub Desktop.
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