code: func IsError(err, errConst error) bool {
  	if err == errConst {
  		return true
  	}
  	// Must rely on string equivalence, otherwise a value is not equal
  	// to its pointer value.
  	rootErrStr := ""
  	rootErr := RootError(err)
  	if rootErr != nil {
  		rootErrStr = rootErr.Error()
  	}
  	errConstStr := ""
  	if errConst != nil {
  		errConstStr = errConst.Error()
  	}
  	return rootErrStr == errConstStr
  }
docs: // Perform a deep check, unwrapping errors as much as possilbe and
  // comparing the string version of the error.