How do I check if a string is a substring of another string in Go?
For example, I want to check someString.contains("something")
.
Use the function Contains
from the strings package.
import (
"strings"
)
strings.Contains("something", "some") // true