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

Code Example 1

import "strings"

// if string found in name it returns 0 else 1
if strings.Compare(name, "compare string") == 1 {
	// Do something
}

Learn ReactJs, React Native from akashmittal.com