MCPcopy Create free account
hub / github.com/opencontainers/go-digest / Available

Method Available

algorithm.go:67–75  ·  view source on GitHub ↗

Available returns true if the digest type is available for use. If this returns false, Digester and Hash will return nil.

()

Source from the content-addressed store, hash-verified

65// Available returns true if the digest type is available for use. If this
66// returns false, Digester and Hash will return nil.
67func (a Algorithm) Available() bool {
68 h, ok := algorithms[a]
69 if !ok {
70 return false
71 }
72
73 // check availability of the hash, as well
74 return h.Available()
75}
76
77func (a Algorithm) String() string {
78 return string(a)

Callers 3

SetMethod · 0.95
HashMethod · 0.95
ValidateMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected