1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2025-03-23 00:00:04 +01:00

Add SecretString support for options

This commit is contained in:
Aneesh Nireshwalia 2023-02-01 01:34:34 -07:00
parent aab8a5f36f
commit 46c26643a7

View file

@ -211,6 +211,10 @@ func (o Options) Apply(ns string, dst interface{}) error {
v.Field(i).SetInt(int64(d))
case "SecretString":
ss := NewSecretString(value)
v.Field(i).Set(reflect.ValueOf(ss))
default:
panic("type " + v.Type().Field(i).Type.Name() + " not handled")
}