Przeglądaj źródła

Initialize the list for backward compatibility.

Mariano Cano 7 lat temu
rodzic
commit
cc8764c343
1 zmienionych plików z 3 dodań i 0 usunięć
  1. 3 0
      authority/provisioner/provisioner.go

+ 3 - 0
authority/provisioner/provisioner.go

@@ -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 {