Check out example codes for "Check string prefix golang". It will help you in understanding the concepts better.

Code Example 1

import ( 
    "strings"
) 
  
myString := "x-test"
result := strings.HasPrefix(s1, "x-")

Learn ReactJs, React Native from akashmittal.com