Check out example codes for "golang get file md5". It will help you in understanding the concepts better.

Code Example 1

f, err := os.Open("path/to/file")
if err != nil {
	log.Fatal(err)
}

defer f.Close()
h := md5.New()
if _, err := io.Copy(h, f); err != nil {
	log.Fatal(err)
}
fmt.Printf("%x", h.Sum(nil))

Learn ReactJs, React Native from akashmittal.com