How to calculate file hash in golang

I’m a gopher, I want to calculate file hash like go-ipfs, but I don’t want to run ipfs daemon, ipfs add command or call ipfs RPC.
How can I get the correct file hash in go code? Any vendor code can import and use?