1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-22 15:57:07 +00:00

options: Handle uint

This commit is contained in:
Alexander Neumann 2017-06-10 21:07:10 +02:00
parent 539674614b
commit 88a59fd0ca

View file

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