Initialize the list for backward compatibility.

This commit is contained in:
Mariano Cano 2019-03-07 16:04:29 -08:00
parent c0ef6f8dc5
commit cc8764c343

View file

@ -24,6 +24,8 @@ type Interface interface {
type Type int
const (
noopType Type = 0
// TypeJWK is used to indicate the JWK provisioners.
TypeJWK Type = 1
@ -55,6 +57,7 @@ func (l *List) UnmarshalJSON(data []byte) error {
return errors.Wrap(err, "error unmarshaling provisioner list")
}
*l = List{}
for _, data := range ps {
var typ provisioner
if err := json.Unmarshal(data, &typ); err != nil {