update code after go mod update

pull/7270/head
Adrien Delorme 7 years ago
parent 2f97dc2933
commit aee73d745d

@ -102,7 +102,6 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
// set default copy file if we're not giving our own
if b.config.CopyFiles == nil {
b.config.CopyFiles = make([]string, 0)
if !b.config.FromScratch {
b.config.CopyFiles = []string{"/etc/resolv.conf"}
}

@ -159,7 +159,8 @@ func TestBuilderPrepare_CopyFilesNoDefault(t *testing.T) {
}
if len(b.config.CopyFiles) > 0 {
t.Errorf("Was expecting no default value for copy_files.")
t.Errorf("Was expecting no default value for copy_files. Found %v",
b.config.CopyFiles)
}
}

@ -3,7 +3,6 @@ package compress
import (
"archive/tar"
"archive/zip"
"compress/gzip"
"context"
"fmt"
"io"
@ -273,8 +272,8 @@ func makeBGZFWriter(output io.WriteCloser, compressionLevel int) (io.WriteCloser
func makeLZ4Writer(output io.WriteCloser, compressionLevel int) (io.WriteCloser, error) {
lzwriter := lz4.NewWriter(output)
if compressionLevel > gzip.DefaultCompression {
lzwriter.Header.HighCompression = true
if compressionLevel > 0 {
lzwriter.Header.CompressionLevel = compressionLevel
}
return lzwriter, nil
}

@ -160,7 +160,7 @@ using standard installation procedures.
The specifics of how to implement each type of interface are covered in the
relevant subsections available in the navigation to the left.
\~> **Lock your dependencies!** Using `govendor` is highly recommended since
\~> **Lock your dependencies!** Using `go mod` is highly recommended since
the Packer codebase will continue to improve, potentially breaking APIs along
the way until there is a stable release. By locking your dependencies, your
plugins will continue to work with the version of Packer you lock to.

Loading…
Cancel
Save