2
2
mirror of https://github.com/octoleo/restic.git synced 2024-12-22 10:58:55 +00:00

Add support for boolean extended options

This commit is contained in:
Nick Douma 2020-11-11 11:48:42 +01:00
parent 407843c5f9
commit 4ddcc17135

View File

@ -199,6 +199,14 @@ func (o Options) Apply(ns string, dst interface{}) error {
v.Field(i).SetUint(vi)
case "bool":
vi, err := strconv.ParseBool(value)
if err != nil {
return err
}
v.Field(i).SetBool(vi)
case "Duration":
d, err := time.ParseDuration(value)
if err != nil {