1- // Copyright (c) 2019-2022 , Sylabs Inc. All rights reserved.
1+ // Copyright (c) 2019-2023 , Sylabs Inc. All rights reserved.
22// Copyright (c) 2017, SingularityWare, LLC. All rights reserved.
33// Copyright (c) 2017, Yannick Cote <yhcote@gmail.com> All rights reserved.
44// This software is licensed under a 3-clause BSD license. Please consult the
@@ -38,11 +38,11 @@ var (
3838func getAddExamples (rootPath string ) string {
3939examples := []string {
4040rootPath +
41- " add image.sif recipe.def -datatype 1" ,
41+ " add image.sif recipe.def -- datatype 1" ,
4242rootPath +
43- " add image.sif rootfs.squashfs --datatype 4 --parttype 1 --partfs 1 ---- partarch 2" ,
43+ " add image.sif rootfs.squashfs --datatype 4 --parttype 1 --partfs 1 --partarch 2" ,
4444rootPath +
45- " add image.sif signature.bin -datatype 5 --signentity 433FE984155206BD962725E20E8713472A879943 --signhash 1" ,
45+ " add image.sif signature.bin -- datatype 5 --signentity 433FE984155206BD962725E20E8713472A879943 --signhash 1" ,
4646}
4747return strings .Join (examples , "\n " )
4848}
@@ -54,34 +54,34 @@ func addFlags(fs *pflag.FlagSet) {
5454 1-Deffile, 2-EnvVar, 3-Labels,
5555 4-Partition, 5-Signature, 6-GenericJSON,
5656 7-Generic, 8-CryptoMessage, 9-SBOM` )
57- partType = fs .Int32 ("parttype" , 0 , `the type of partition (with -datatype 4-Partition)
57+ partType = fs .Int32 ("parttype" , 0 , `the type of partition (with -- datatype 4-Partition)
5858[NEEDED, no default]:
5959 1-System, 2-PrimSys, 3-Data,
6060 4-Overlay` )
61- partFS = fs .Int32 ("partfs" , 0 , `the filesystem used (with -datatype 4-Partition)
61+ partFS = fs .Int32 ("partfs" , 0 , `the filesystem used (with -- datatype 4-Partition)
6262[NEEDED, no default]:
6363 1-Squash, 2-Ext3, 3-ImmuObj,
6464 4-Raw` )
65- partArch = fs .Int32 ("partarch" , 0 , `the main architecture used (with -datatype 4-Partition)
65+ partArch = fs .Int32 ("partarch" , 0 , `the main architecture used (with -- datatype 4-Partition)
6666[NEEDED, no default]:
6767 1-386, 2-amd64, 3-arm,
6868 4-arm64, 5-ppc64, 6-ppc64le,
6969 7-mips, 8-mipsle, 9-mips64,
7070 10-mips64le, 11-s390x, 12-riscv64` )
71- signHash = fs .Int32 ("signhash" , 0 , `the signature hash used (with -datatype 5-Signature)
71+ signHash = fs .Int32 ("signhash" , 0 , `the signature hash used (with -- datatype 5-Signature)
7272[NEEDED, no default]:
7373 1-SHA256, 2-SHA384, 3-SHA512,
7474 4-BLAKE2s_256, 5-BLAKE2b_256` )
75- signEntity = fs .String ("signentity" , "" , `the entity that signs (with -datatype 5-Signature)
75+ signEntity = fs .String ("signentity" , "" , `the entity that signs (with -- datatype 5-Signature)
7676[NEEDED, no default]:
7777 example: 433FE984155206BD962725E20E8713472A879943` )
78- sbomFormat = fs .String ("sbomformat" , "" , `the SBOM format (with -datatype 9-sbom):
78+ sbomFormat = fs .String ("sbomformat" , "" , `the SBOM format (with -- datatype 9-sbom):
7979 cyclonedx-json, cyclonedx-xml, github-json,
8080 spdx-json, spdx-rdf, spdx-tag-value,
8181 spdx-yaml, syft-json` )
8282groupID = fs .Uint32 ("groupid" , 0 , "set groupid [default: 0]" )
8383linkID = fs .Uint32 ("link" , 0 , "set link pointer [default: 0]" )
84- alignment = fs .Int ("alignment" , 0 , "set alignment [default: 4096 with -datatype 4-Partition, 0 otherwise]" )
84+ alignment = fs .Int ("alignment" , 0 , "set alignment [default: 4096 with -- datatype 4-Partition, 0 otherwise]" )
8585name = fs .String ("filename" , "" , "set logical filename/handle [default: input filename]" )
8686}
8787
@@ -189,9 +189,9 @@ func getSBOMFormat() (sif.SBOMFormat, error) {
189189}
190190
191191var (
192- errPartitionArgs = errors .New ("with partition datatype, -partfs, -parttype and -partarch must be passed" )
192+ errPartitionArgs = errors .New ("with partition datatype, -- partfs, -- parttype and - -partarch must be passed" )
193193errInvalidFingerprintLength = errors .New ("invalid signing entity fingerprint length" )
194- errSBOMArgs = errors .New ("with SBOM datatype, -sbomformat must be passed" )
194+ errSBOMArgs = errors .New ("with SBOM datatype, -- sbomformat must be passed" )
195195)
196196
197197func getOptions (dt sif.DataType , fs * pflag.FlagSet ) ([]sif.DescriptorInputOpt , error ) {
0 commit comments