Fix UnmarshalJSON comment.

This commit is contained in:
Mariano Cano 2020-07-31 11:00:17 -07:00
parent f1773489fc
commit 7c3c16b7be

View file

@ -37,8 +37,8 @@ func (s SignatureAlgorithm) Set(c *x509.Certificate) {
c.SignatureAlgorithm = x509.SignatureAlgorithm(s) c.SignatureAlgorithm = x509.SignatureAlgorithm(s)
} }
// UnmarshalJSON implements the json.Unmarshal interface and unmarshals a JSON // UnmarshalJSON implements the json.Unmarshal interface and unmarshals and
// object in the Subject struct or a string as just the subject common name. // validates a string as a SignatureAlgorithm.
func (s *SignatureAlgorithm) UnmarshalJSON(data []byte) error { func (s *SignatureAlgorithm) UnmarshalJSON(data []byte) error {
name, err := unmarshalString(data) name, err := unmarshalString(data)
if err != nil { if err != nil {