File: tar_fix_go110.go

package info (click to toggle)
packer 1.6.6%2Bds2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 33,156 kB
  • sloc: sh: 1,154; python: 619; makefile: 251; ruby: 205; xml: 97
file content (17 lines) | stat: -rw-r--r-- 384 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// +build go1.10

package compress

import (
	"archive/tar"
	"time"
)

func setHeaderFormat(header *tar.Header) {
	// We have to set the Format explicitly for the googlecompute-import
	// post-processor. Google Cloud only allows importing GNU tar format.
	header.Format = tar.FormatGNU
	header.AccessTime = time.Time{}
	header.ModTime = time.Time{}
	header.ChangeTime = time.Time{}
}