forked from TrueCloudLab/distribution
Fix small lint and unit test issues
Pull request ci was not running and caused these minor issues to not be caught. Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
This commit is contained in:
parent
44282379f6
commit
b0327914c5
3 changed files with 4 additions and 2 deletions
|
@ -79,7 +79,7 @@ func (a *Algorithm) Set(value string) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// New 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 New.
|
||||||
func (a Algorithm) Digester() Digester {
|
func (a Algorithm) Digester() Digester {
|
||||||
|
|
|
@ -61,7 +61,7 @@ var (
|
||||||
ErrDigestUnsupported = fmt.Errorf("unsupported digest algorithm")
|
ErrDigestUnsupported = fmt.Errorf("unsupported digest algorithm")
|
||||||
)
|
)
|
||||||
|
|
||||||
// ParseDigest parses s and returns the validated digest object. An error will
|
// Parse parses s and returns the validated digest object. An error will
|
||||||
// be returned if the format is invalid.
|
// be returned if the format is invalid.
|
||||||
func Parse(s string) (Digest, error) {
|
func Parse(s string) (Digest, error) {
|
||||||
d := Digest(s)
|
d := Digest(s)
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package reference
|
package reference
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
_ "crypto/sha256"
|
||||||
|
_ "crypto/sha512"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
Loading…
Reference in a new issue