diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2020-03-29 06:16:27 -0400 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2020-03-29 06:16:27 -0400 |
commit | 366001fb5fa96b3b0f2f9e84b7ebc56dc4c94adc (patch) | |
tree | f0bb3892c5fdf7fc1704dcd28a46b4aa751ff593 /vendor/github.com/ulikunitz/xz/format.go | |
parent | 684b4bd2f16d078edd25d262bb8baefc699508e9 (diff) | |
download | podman-366001fb5fa96b3b0f2f9e84b7ebc56dc4c94adc.tar.gz podman-366001fb5fa96b3b0f2f9e84b7ebc56dc4c94adc.tar.bz2 podman-366001fb5fa96b3b0f2f9e84b7ebc56dc4c94adc.zip |
Update vendor of boltdb and containers/image
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'vendor/github.com/ulikunitz/xz/format.go')
-rw-r--r-- | vendor/github.com/ulikunitz/xz/format.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/vendor/github.com/ulikunitz/xz/format.go b/vendor/github.com/ulikunitz/xz/format.go index 798159c6c..edfec9a94 100644 --- a/vendor/github.com/ulikunitz/xz/format.go +++ b/vendor/github.com/ulikunitz/xz/format.go @@ -1,4 +1,4 @@ -// Copyright 2014-2017 Ulrich Kunitz. All rights reserved. +// Copyright 2014-2019 Ulrich Kunitz. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -46,7 +46,8 @@ const HeaderLen = 12 // Constants for the checksum methods supported by xz. const ( - CRC32 byte = 0x1 + None byte = 0x0 + CRC32 = 0x1 CRC64 = 0x4 SHA256 = 0xa ) @@ -58,7 +59,7 @@ var errInvalidFlags = errors.New("xz: invalid flags") // invalid. func verifyFlags(flags byte) error { switch flags { - case CRC32, CRC64, SHA256: + case None, CRC32, CRC64, SHA256: return nil default: return errInvalidFlags @@ -67,6 +68,7 @@ func verifyFlags(flags byte) error { // flagstrings maps flag values to strings. var flagstrings = map[byte]string{ + None: "None", CRC32: "CRC-32", CRC64: "CRC-64", SHA256: "SHA-256", @@ -85,6 +87,8 @@ func flagString(flags byte) string { // hash method encoded in flags. func newHashFunc(flags byte) (newHash func() hash.Hash, err error) { switch flags { + case None: + newHash = newNoneHash case CRC32: newHash = newCRC32 case CRC64: |