mirror of
https://github.com/restic/restic.git
synced 2025-01-03 13:45:20 +00:00
options: Handle uint
This commit is contained in:
parent
539674614b
commit
88a59fd0ca
1 changed files with 8 additions and 0 deletions
|
@ -192,6 +192,14 @@ func (o Options) Apply(ns string, dst interface{}) error {
|
||||||
|
|
||||||
v.Field(i).SetInt(vi)
|
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":
|
case "Duration":
|
||||||
d, err := time.ParseDuration(value)
|
d, err := time.ParseDuration(value)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue