Enable golint in pkg/arcive
Signed-off-by: Lei Jitang <leijitang@huawei.com>
This commit is contained in:
parent
fe395e584f
commit
fb58e0d9c2
8 changed files with 62 additions and 20 deletions
|
@ -6,7 +6,7 @@ import "github.com/docker/docker/pkg/archive"
|
|||
// and applies it to the directory `dest`. The stream `layer` can only be
|
||||
// uncompressed.
|
||||
// Returns the size in bytes of the contents of the layer.
|
||||
func ApplyLayer(dest string, layer archive.ArchiveReader) (size int64, err error) {
|
||||
func ApplyLayer(dest string, layer archive.Reader) (size int64, err error) {
|
||||
return applyLayerHandler(dest, layer, true)
|
||||
}
|
||||
|
||||
|
@ -14,6 +14,6 @@ func ApplyLayer(dest string, layer archive.ArchiveReader) (size int64, err error
|
|||
// `layer`, and applies it to the directory `dest`. The stream `layer`
|
||||
// can only be uncompressed.
|
||||
// Returns the size in bytes of the contents of the layer.
|
||||
func ApplyUncompressedLayer(dest string, layer archive.ArchiveReader) (int64, error) {
|
||||
func ApplyUncompressedLayer(dest string, layer archive.Reader) (int64, error) {
|
||||
return applyLayerHandler(dest, layer, false)
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ func applyLayer() {
|
|||
// applyLayerHandler parses a diff in the standard layer format from `layer`, and
|
||||
// applies it to the directory `dest`. Returns the size in bytes of the
|
||||
// contents of the layer.
|
||||
func applyLayerHandler(dest string, layer archive.ArchiveReader, decompress bool) (size int64, err error) {
|
||||
func applyLayerHandler(dest string, layer archive.Reader, decompress bool) (size int64, err error) {
|
||||
dest = filepath.Clean(dest)
|
||||
if decompress {
|
||||
decompressed, err := archive.DecompressStream(layer)
|
||||
|
|
|
@ -12,7 +12,7 @@ import (
|
|||
// applyLayerHandler parses a diff in the standard layer format from `layer`, and
|
||||
// applies it to the directory `dest`. Returns the size in bytes of the
|
||||
// contents of the layer.
|
||||
func applyLayerHandler(dest string, layer archive.ArchiveReader, decompress bool) (size int64, err error) {
|
||||
func applyLayerHandler(dest string, layer archive.Reader, decompress bool) (size int64, err error) {
|
||||
dest = filepath.Clean(dest)
|
||||
if decompress {
|
||||
decompressed, err := archive.DecompressStream(layer)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue