github.com/angdraug/packer@v1.3.2/post-processor/compress/tar_fix_go110.go (about)

     1  // +build go1.10
     2  
     3  package compress
     4  
     5  import (
     6  	"archive/tar"
     7  	"time"
     8  )
     9  
    10  func setHeaderFormat(header *tar.Header) {
    11  	// We have to set the Format explicitly for the googlecompute-import
    12  	// post-processor. Google Cloud only allows importing GNU tar format.
    13  	header.Format = tar.FormatGNU
    14  	header.AccessTime = time.Time{}
    15  	header.ModTime = time.Time{}
    16  	header.ChangeTime = time.Time{}
    17  }