Documentation
¶
Index ¶
- Variables
- func BindLegacyEnv(w io.Writer)
- func EnumCheck(cmd *cobra.Command, flag string, allowed []string)
- func IntPtrOrNil(i int) *int
- func JSONValue(raw, flag string) any
- func MigrateLegacyConfig(home string, w io.Writer) (configPath string, migrated bool)
- func StringArrayToIntArray(strArr []string) []int
- func StringPtrOrNil(s string) *string
- func StringToInt(s string) int
- func StringToTime(dateStr string) time.Time
- type Version
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func BindLegacyEnv ¶
BindLegacyEnv binds config keys to their HOSTINGER_MAIL_* env var with a deprecated HAPI_* fallback on the global viper, emitting a one-time notice to w per key whose value comes from the legacy variable.
func IntPtrOrNil ¶
func MigrateLegacyConfig ¶
MigrateLegacyConfig returns the YAML config path the CLI should read and whether a one-time migration (or legacy fallback) happened. When the new ~/.hostinger-mail.yaml is absent but a legacy ~/.hapi.yaml exists, it moves the old file to the new path. If the move fails, it falls back to the old path in place. Notices are written to w. With no legacy file, it is a no-op.
func StringArrayToIntArray ¶
func StringPtrOrNil ¶
func StringToInt ¶
func StringToTime ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.