Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ConfigCmd = &cobra.Command{ Use: "config", Short: "subcommands for webman config", Long: ` The "config" subcommand allows you to change your base webman config. `, RunE: func(cmd *cobra.Command, args []string) error { cfg, err := config.Load() if err != nil { return err } q := &survey.Input{ Message: "Refresh interval", Help: "How long before webman should refresh a package repository (ex: `6h`)", Default: cfg.RefreshInterval.String(), } if err := survey.AskOne(q, &cfg.RefreshInterval, survey.WithValidator(func(ans interface{}) error { _, err := time.ParseDuration(fmt.Sprint(ans)) return err })); err != nil { return err } if err := cfg.Save(); err != nil { return err } color.HiGreen("Config saved") return nil }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.