forked from TrueCloudLab/certificates
Initialize the list for backward compatibility.
This commit is contained in:
parent
c0ef6f8dc5
commit
cc8764c343
1 changed files with 3 additions and 0 deletions
|
@ -24,6 +24,8 @@ type Interface interface {
|
||||||
type Type int
|
type Type int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
noopType Type = 0
|
||||||
|
|
||||||
// TypeJWK is used to indicate the JWK provisioners.
|
// TypeJWK is used to indicate the JWK provisioners.
|
||||||
TypeJWK Type = 1
|
TypeJWK Type = 1
|
||||||
|
|
||||||
|
@ -55,6 +57,7 @@ func (l *List) UnmarshalJSON(data []byte) error {
|
||||||
return errors.Wrap(err, "error unmarshaling provisioner list")
|
return errors.Wrap(err, "error unmarshaling provisioner list")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*l = List{}
|
||||||
for _, data := range ps {
|
for _, data := range ps {
|
||||||
var typ provisioner
|
var typ provisioner
|
||||||
if err := json.Unmarshal(data, &typ); err != nil {
|
if err := json.Unmarshal(data, &typ); err != nil {
|
||||||
|
|
Loading…
Reference in a new issue