You've already forked go-digest
mirror of
https://github.com/opencontainers/go-digest.git
synced 2025-07-30 00:21:10 +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:
@ -39,7 +39,7 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Available returns true if the digest type is available for use. If this
|
// 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 {
|
func (a Algorithm) Available() bool {
|
||||||
h, ok := algorithms[a]
|
h, ok := algorithms[a]
|
||||||
if !ok {
|
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
|
// 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
|
// 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 {
|
func (a Algorithm) Digester() Digester {
|
||||||
return &digester{
|
return &digester{
|
||||||
alg: a,
|
alg: a,
|
||||||
|
Reference in New Issue
Block a user