mirror of
https://github.com/hauler-dev/hauler.git
synced 2026-05-20 08:04:15 +00:00
* fix: move constant and flags to prevent loop * feat: add tls cert to serve * fix: add tls cli description * fix: remove unnecessary code * small updates/fixed unit test errors * fix: migrate all flags, use exported vars * fix: standardize to AddFlags --------- Signed-off-by: will <30413278+wcrum@users.noreply.github.com> Co-authored-by: Zack Brady <zackbrady123@gmail.com>
19 lines
563 B
Go
19 lines
563 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", "", "overrides the default directory for temporary files, as returned by your OS.")
|
|
}
|