Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "backup", Short: "Backup application for securely storing incremental backups", Long: `Backup application designed to work with Amazon Glacier in mind, but can also handle local filesystem based backups.`, PersistentPreRun: func(cmd *cobra.Command, args []string) { if _, err := os.Stat(cfgPath); os.IsNotExist(err) { os.MkdirAll(cfgPath, 0755) } logFile, _ := cmd.InheritedFlags().GetString("log-file") logFile = os.ExpandEnv(logFile) f, err := os.OpenFile(logFile, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) if err != nil { fmt.Printf("Error opening log file, defaulting to stderr: %s\n", err) f = nil } debug, _ := cmd.InheritedFlags().GetBool("debug") log.SetupLogging(f, os.Stderr, debug, debug) }, }
This 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.