mirror of
https://github.com/hauler-dev/hauler.git
synced 2026-05-18 23:28:31 +00:00
* add platform flag to store save Signed-off-by: Adam Martin <adam.martin@ranchergovernment.com> * use platform parser from go-cr Signed-off-by: Adam Martin <adam.martin@ranchergovernment.com> --------- Signed-off-by: Adam Martin <adam.martin@ranchergovernment.com>
17 lines
469 B
Go
17 lines
469 B
Go
package flags
|
|
|
|
import "github.com/spf13/cobra"
|
|
|
|
type SaveOpts struct {
|
|
*StoreRootOpts
|
|
FileName string
|
|
Platform string
|
|
}
|
|
|
|
func (o *SaveOpts) AddFlags(cmd *cobra.Command) {
|
|
f := cmd.Flags()
|
|
|
|
f.StringVarP(&o.FileName, "filename", "f", "haul.tar.zst", "(Optional) Specify the name of outputted archive")
|
|
f.StringVarP(&o.Platform, "platform", "p", "", "(Optional) Specifiy the platform of the images for the outputted archive... i.e. linux/amd64 (defaults to all)")
|
|
}
|