mirror of
https://github.com/hauler-dev/hauler.git
synced 2026-05-19 23:57:37 +00:00
* initial desc formatting/updates * fixed typos * updated commands base on feedback * more updates based on feedback --------- Signed-off-by: Zack Brady <zackbrady123@gmail.com>
19 lines
560 B
Go
19 lines
560 B
Go
package flags
|
|
|
|
import "github.com/spf13/cobra"
|
|
|
|
type LoadOpts struct {
|
|
*StoreRootOpts
|
|
TempOverride string
|
|
}
|
|
|
|
func (o *LoadOpts) AddFlags(cmd *cobra.Command) {
|
|
f := cmd.Flags()
|
|
|
|
// On Unix systems, the default is $TMPDIR if non-empty, else /tmp.
|
|
// On Windows, the default is GetTempPath, returning the first non-empty
|
|
// value from %TMP%, %TEMP%, %USERPROFILE%, or the Windows directory.
|
|
// On Plan 9, the default is /tmp.
|
|
f.StringVarP(&o.TempOverride, "tempdir", "t", "", "(Optional) Override the default temporary directiory determined by the OS")
|
|
}
|