This commit is contained in:
Tobias Klein 2017-09-09 18:19:19 +02:00
parent 8f9ef4402b
commit ed30bd7b76

View file

@ -6,8 +6,8 @@ import (
"sort"
"strings"
"github.com/restic/restic/internal/restic"
"github.com/restic/restic/internal/errors"
"github.com/restic/restic/internal/restic"
"github.com/spf13/cobra"
)
@ -101,12 +101,16 @@ func runForget(opts ForgetOptions, gopts GlobalOptions, args []string) error {
GroupOptionList = strings.Split(opts.GroupBy, ",")
for _, option := range GroupOptionList {
switch( option ) {
case "host": GroupByHost = true
case "paths": GroupByPath = true
case "tags": GroupByTag = true
switch option {
case "host":
GroupByHost = true
case "paths":
GroupByPath = true
case "tags":
GroupByTag = true
case "":
default: return errors.Fatal( "unknown grouping option: '" + option + "'" )
default:
return errors.Fatal("unknown grouping option: '" + option + "'")
}
}