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

Code Example 1

func reverse(s string) string {
	runes := []rune(s)
	for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 {
		runes[i], runes[j] = runes[j], runes[i]
	}
	return string(runes)
}

Learn ReactJs, React Native from akashmittal.com