Check out example codes for "golang get file sha256". 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 := sha256.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