File tree Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -76,9 +76,6 @@ out when using this package.
7676
7777The Go API , at this stage, is considered stable, unless otherwise noted.
7878
79- Right now, only two methods are marked as " deprecated" , which may be
80- removed before wider deployment.
81-
8279As always, before using a package export, read the [godoc](https:// godoc.org/github.com/docker/go-digest).
8380
8481# Contributing
Original file line number Diff line number Diff line change @@ -89,11 +89,6 @@ func (a Algorithm) Digester() Digester {
8989 }
9090}
9191
92- // New is deprecated. Use Algorithm.Digester.
93- func (a Algorithm ) New () Digester {
94- return a .Digester ()
95- }
96-
9792// Hash returns a new hash as used by the algorithm. If not available, the
9893// method will panic. Check Algorithm.Available() before calling.
9994func (a Algorithm ) Hash () hash.Hash {
@@ -118,7 +113,7 @@ func (a Algorithm) Hash() hash.Hash {
118113
119114// FromReader returns the digest of the reader using the algorithm.
120115func (a Algorithm ) FromReader (rd io.Reader ) (Digest , error ) {
121- digester := a .New ()
116+ digester := a .Digester ()
122117
123118 if _ , err := io .Copy (digester .Hash (), rd ); err != nil {
124119 return "" , err
@@ -129,7 +124,7 @@ func (a Algorithm) FromReader(rd io.Reader) (Digest, error) {
129124
130125// FromBytes digests the input and returns a Digest.
131126func (a Algorithm ) FromBytes (p []byte ) Digest {
132- digester := a .New ()
127+ digester := a .Digester ()
133128
134129 if _ , err := digester .Hash ().Write (p ); err != nil {
135130 // Writes to a Hash should never fail. None of the existing
You can’t perform that action at this time.
0 commit comments