code: func ReasonStringToCode(reason string) (reasonCode int, err error) {
  	// default to 0
  	if reason == "" {
  		return 0, nil
  	}
  
  	reasonCode, present := revocationReasonCodes[strings.ToLower(reason)]
  	if !present {
  		reasonCode, err = strconv.Atoi(reason)
  		if err != nil {
  			return
  		}
  		if reasonCode >= ocsp.AACompromise || reasonCode <= ocsp.Unspecified {
  			return 0, cferr.New(cferr.OCSPError, cferr.InvalidStatus)
  		}
  	}
  
  	return
  }
docs: // ReasonStringToCode tries to convert a reason string to an integer code