mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 20:51:43 +00:00
Based on the [discussion in Slack](https://sourcegraph.slack.com/archives/C02UC4WUX1Q/p1717067410264679), thought it would be useful to solidify the invariants that hold between errors.As, errors.Is and errors.HasType (and provide counter-examples for things which you think ought to hold but don't actually hold) in code itself, instead of just via docs. So this PR adds property-based tests for quickly generating different kinds of error shapes, and check which invariants hold and which ones don't. It also adds better documentation for errors.Is and errors.As |
||
|---|---|---|
| .. | ||
| accesstoken | ||
| api | ||
| background | ||
| batches | ||
| cliutil | ||
| codeintel | ||
| enterpriseportal | ||
| errors | ||
| gitservice | ||
| iterator | ||
| managedservicesplatform | ||
| output | ||
| pointers | ||
| process | ||
| servicecatalog | ||
| telemetrygateway | ||
| buf.yaml | ||
| go.mod | ||
| go.sum | ||
| README.md | ||
| tools.go | ||
Sourcegraph lib module
This directory is the root of a separate go module from the primary module rooted at sourcegraph/sourcegraph. This module exists to hold code that we want to reuse outside of the sourcegraph/sourcegraph repo.
Code in this module should not import from sourcegraph/sourcegraph or from other Sourcegraph repositories to avoid complicated dependency relationships. Instead consider moving code from elsewhere into this module.