golang get prefix code example
Example: Check string prefix golang
import (
"strings"
)
myString := "x-test"
result := strings.HasPrefix(s1, "x-")
import (
"strings"
)
myString := "x-test"
result := strings.HasPrefix(s1, "x-")