* fix for #178

* restore options

* error codes

* update docs

* forget docs

* add option to auto forget

* add copy option

* update go version to enable generics

* copy docs

* changelog & version bump
This commit is contained in:
2022-04-14 11:51:32 +02:00
committed by GitHub
parent 2da440a1cd
commit 434862ed4e
16 changed files with 352 additions and 298 deletions

View File

@@ -17,17 +17,17 @@ import (
"github.com/spf13/viper"
)
const VERSION = "1.5.8"
const VERSION = "1.6.0"
type OptionMap map[string][]interface{}
type Options map[string]OptionMap
type Config struct {
Version string `yaml:"version"`
Extras interface{} `yaml:"extras"`
Locations map[string]Location `yaml:"locations"`
Backends map[string]Backend `yaml:"backends"`
Global Options `yaml:"global"`
Version string `mapstructure:"version"`
Extras interface{} `mapstructure:"extras"`
Locations map[string]Location `mapstructure:"locations"`
Backends map[string]Backend `mapstructure:"backends"`
Global Options `mapstructure:"global"`
}
var once sync.Once
@@ -56,7 +56,7 @@ func GetConfig() *Config {
// Load env file
envFile := filepath.Join(filepath.Dir(absConfig), ".autorestic.env")
err = godotenv.Load(envFile)
if err == nil {
if err == nil && !flags.CRON_LEAN {
colors.Faint.Println("Using env:\t", envFile)
}
} else {