Documentation
¶
Overview ¶
Package commands define command-line interface for Hoor, current implementation is based on the Cobra package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var HoorCmd = &cobra.Command{ Use: "hoor", Short: "Add Shamsi date to Hugo based websites with ease", PreRun: func(cmd *cobra.Command, args []string) { startTime = time.Now() if err := defineWorkingDir(); err != nil { return } if debugMode { jww.SetStdoutThreshold(jww.LevelTrace) } viper.SetDefault("shamsiDateFormat", "dd MM yyyy") }, Run: func(cmd *cobra.Command, args []string) { site, err := loadHugoSite() if err != nil { return } if input != "" { applyToFile(input) return } applyToSite(site) }, }
HoorCmd represents the base command when called without any subcommands.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.