fup: add bucket-url flag for specifying storage
This allows setting the persistent storage location to save files into. NOTE: defaults to mem:// for development purposes, which... is gonna be a bad time.
This commit is contained in:
parent
7e4fb52cef
commit
25443cfaab
1 changed files with 3 additions and 0 deletions
|
@ -13,6 +13,7 @@ import (
|
|||
|
||||
var (
|
||||
cfgFile string
|
||||
bucketURL string
|
||||
|
||||
rootCmd = &cobra.Command{
|
||||
Use: "fup",
|
||||
|
@ -29,6 +30,8 @@ func init() {
|
|||
cobra.OnInitialize(initConfig)
|
||||
|
||||
rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file")
|
||||
rootCmd.PersistentFlags().StringVar(&bucketURL, "bucket-url", "mem://", "gocloud.dev-compatible URL to use for file storage")
|
||||
viper.BindPFlag("storage.bucketURL", rootCmd.PersistentFlags().Lookup("bucket-url"))
|
||||
}
|
||||
|
||||
func initConfig() {
|
||||
|
|
Loading…
Reference in a new issue