747f89cd32
This introduces Versions for TarSum checksums. Fixes: https://github.com/docker/docker/issues/7526 It preserves current functionality and abstracts the interface for future flexibility of hashing algorithms. As a POC, the VersionDev Tarsum does not include the mtime in the checksum calculation, and would solve https://github.com/docker/docker/issues/7387 though this is not a settled Version is subject to change until a version number is assigned. Signed-off-by: Vincent Batts <vbatts@redhat.com>
22 lines
260 B
Go
22 lines
260 B
Go
package tarsum
|
|
|
|
import (
|
|
"io"
|
|
)
|
|
|
|
type writeCloseFlusher interface {
|
|
io.WriteCloser
|
|
Flush() error
|
|
}
|
|
|
|
type nopCloseFlusher struct {
|
|
io.Writer
|
|
}
|
|
|
|
func (n *nopCloseFlusher) Close() error {
|
|
return nil
|
|
}
|
|
|
|
func (n *nopCloseFlusher) Flush() error {
|
|
return nil
|
|
}
|