1
0
mirror of https://github.com/opencontainers/go-digest.git synced 2025-07-28 13:21:56 +03:00

algorithm: More New removal

The remaining New on a cytpo.Hash, so it stays.

Signed-off-by: W. Trevor King <wking@tremily.us>
This commit is contained in:
W. Trevor King
2016-12-16 16:29:04 -08:00
parent 5506f1c7c1
commit fe5ffa6d5f

View File

@ -39,7 +39,7 @@ var (
)
// Available returns true if the digest type is available for use. If this
// returns false, New and Hash will return nil.
// returns false, Digester and Hash will return nil.
func (a Algorithm) Available() bool {
h, ok := algorithms[a]
if !ok {
@ -81,7 +81,7 @@ func (a *Algorithm) Set(value string) error {
// Digester returns a new digester for the specified algorithm. If the algorithm
// does not have a digester implementation, nil will be returned. This can be
// checked by calling Available before calling New.
// checked by calling Available before calling Digester.
func (a Algorithm) Digester() Digester {
return &digester{
alg: a,