Documentation ¶
Overview ¶
Package Unify - This package contains common functionality that's used across multiple binaries. It's an easy way to include some important functionality into every binary. Currently, it provides: - Cron scheduler. - Daemonizing a process. - Logging. - Version control and self-update. - Cobra/Viper integration. - Interactive shell based on Cobra CLI commands.
Index ¶
- func CmdRoot(_ *cobra.Command, args []string) error
- type Commands
- type Flags
- type Options
- type Unify
- func (u *Unify) Execute() error
- func (u *Unify) GetCacheDir() string
- func (u *Unify) GetCmd() *cobra.Command
- func (u *Unify) GetConfigDir() string
- func (u *Unify) GetConfigFile() string
- func (u *Unify) GetEnvPrefix() string
- func (u *Unify) GetViper() *viper.Viper
- func (u *Unify) InitCmds() error
- func (u *Unify) InitFlags() error
- func (u *Unify) ReadConfig() error
- func (u *Unify) WriteConfig() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Commands ¶
type Options ¶
type Options struct { Description string `json:"description"` BinaryName string `json:"binary_name"` BinaryVersion string `json:"binary_version"` SourceRepo string `json:"source_repo"` BinaryRepo string `json:"binary_repo"` EnvPrefix string `json:"env_prefix"` HelpSummary string `json:"help_template"` ReadMe string `json:"readme"` Examples string `json:"examples"` }
Click to show internal directories.
Click to hide internal directories.