2023-03-02 15:37:05 -05:00
|
|
|
// Copyright (c) HashiCorp, Inc.
|
2023-08-10 15:53:29 -07:00
|
|
|
// SPDX-License-Identifier: BUSL-1.1
|
2023-03-02 15:37:05 -05:00
|
|
|
|
2021-09-02 12:15:13 +02:00
|
|
|
//go:build go1.10
|
2018-03-29 22:50:58 -05:00
|
|
|
// +build go1.10
|
|
|
|
|
|
|
|
|
|
package compress
|
|
|
|
|
|
2018-06-26 14:06:37 -04:00
|
|
|
import (
|
|
|
|
|
"archive/tar"
|
|
|
|
|
"time"
|
|
|
|
|
)
|
2018-03-29 22:50:58 -05:00
|
|
|
|
|
|
|
|
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
|
2018-06-26 14:06:37 -04:00
|
|
|
header.AccessTime = time.Time{}
|
|
|
|
|
header.ModTime = time.Time{}
|
|
|
|
|
header.ChangeTime = time.Time{}
|
2018-03-29 22:50:58 -05:00
|
|
|
}
|