features: print warning for stable/depreacted feature flags

This commit is contained in:
Michael Eischer
2024-02-17 21:50:25 +01:00
parent fe68d2cafb
commit a9b64cd7ad
4 changed files with 35 additions and 17 deletions

View File

@@ -104,7 +104,9 @@ func main() {
// we can show the logs
log.SetOutput(logBuffer)
err := feature.Flag.Apply(os.Getenv("RESTIC_FEATURES"))
err := feature.Flag.Apply(os.Getenv("RESTIC_FEATURES"), func(s string) {
fmt.Fprintln(os.Stderr, s)
})
if err != nil {
fmt.Fprintln(os.Stderr, err)
Exit(1)