mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2025-09-07 19:10:39 +00:00
allow options for backend
This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
const VERSION = "1.1.0"
|
||||
const VERSION = "1.1.1"
|
||||
|
||||
var CI bool = false
|
||||
var VERBOSE bool = false
|
||||
@@ -220,3 +220,13 @@ func (c *Config) SaveConfig() error {
|
||||
|
||||
return viper.WriteConfig()
|
||||
}
|
||||
|
||||
func getOptions(options Options, key string) []string {
|
||||
var selected []string
|
||||
for k, values := range options[key] {
|
||||
for _, value := range values {
|
||||
selected = append(selected, fmt.Sprintf("--%s", k), value)
|
||||
}
|
||||
}
|
||||
return selected
|
||||
}
|
||||
|
Reference in New Issue
Block a user