Check out example codes for "base64 encode golang". It will help you in understanding the concepts better.
Code Example 1
sEnc := base64.StdEncoding.EncodeToString([]byte(data))
fmt.Println(sEnc)
Learn ReactJs, React Native from akashmittal.com