common: merge all *ToPtr methods to one generic ToPtr
After introducing Go 1.18 to a project, it's required by law to convert at least one method to a generic one. Everyone hates IntToPtr, StringToPtr, BoolToPtr and Uint64ToPtr, so let's convert them to the ultimate generic ToPtr one. Signed-off-by: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
parent
0359647a82
commit
b997142db0
46 changed files with 397 additions and 392 deletions
|
|
@ -87,9 +87,9 @@ func (img *LiveImage) InstantiateManifest(m *manifest.Manifest,
|
|||
archivePipeline.Format = osbuild.TarArchiveFormatOldgnu
|
||||
archivePipeline.RootNode = osbuild.TarRootNodeOmit
|
||||
// these are required to successfully import the image to GCP
|
||||
archivePipeline.ACLs = common.BoolToPtr(false)
|
||||
archivePipeline.SELinux = common.BoolToPtr(false)
|
||||
archivePipeline.Xattrs = common.BoolToPtr(false)
|
||||
archivePipeline.ACLs = common.ToPtr(false)
|
||||
archivePipeline.SELinux = common.ToPtr(false)
|
||||
archivePipeline.Xattrs = common.ToPtr(false)
|
||||
archivePipeline.Filename = img.Filename // filename extension will determine compression
|
||||
default:
|
||||
panic("invalid image format for image kind")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue