commit | db596e7f6825de31b6f2091741c8841362d4a1f3 | [log] [tgz] |
---|---|---|
author | Christopher Collins <ccollins@apache.org> | Fri May 24 12:37:22 2019 -0700 |
committer | ccollins476ad <ccollins476ad@gmail.com> | Wed May 29 10:03:35 2019 -0700 |
tree | ede1a7837d5bdb1f89db5e74d7b02aabcf554ed0 | |
parent | dc98b6ddc9af4a4cb4e69e36bb5b84fd6326b9ad [diff] |
artifact: add image.CalcHash() function Prior to this commit, the only way to calculate an image's hash was to use image.calcHash() (in `artifact/image/create.go`). This function is private to the `image` package, and it takes a set of parameters that are is not convenient for most cases. This commit adds a new public function to the `image.Image` type: ``` func (i *Image) CalcHash() ([]byte, error) ```