sourcegraph/lib
Varun Gandhi 2c3e813a31
chore: Add tests documenting error invariants (#62992)
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
2024-06-03 19:46:53 +08:00
..
accesstoken chore: Expose ParsePersonalAccessToken publicly for src-cli (#62587) 2024-05-10 19:32:14 +08:00
api enterprise: Move last directory out (#57392) 2023-10-05 20:15:40 +00:00
background feat/lib/background: mark goroutine names as safe for Sentry (#63010) 2024-05-31 17:58:43 +00:00
batches bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
cliutil sg: improve positional completions (#58569) 2023-11-27 16:30:59 -08:00
codeintel chore: Use new cmp package to simplify comparisons (#63029) 2024-06-03 19:44:48 +08:00
enterpriseportal feat/enterpriseportal/codyaccess: add subscription display name (#62968) 2024-05-29 18:26:40 -07:00
errors chore: Add tests documenting error invariants (#62992) 2024-06-03 19:46:53 +08:00
gitservice bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
iterator ci: re-enable race detection (#52776) 2023-06-05 20:41:47 +02:00
managedservicesplatform chore: Add tests documenting error invariants (#62992) 2024-06-03 19:46:53 +08:00
output sg/msp: filter generated environments by category (#62131) 2024-04-24 09:44:16 -07:00
pointers msp: add monitoring stack (#58816) 2023-12-13 19:40:57 +00:00
process bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
servicecatalog bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
telemetrygateway bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
buf.yaml lib/enterpriseportal: initial service API for RFC 885 (#62263) 2024-05-15 12:58:55 -07:00
go.mod chore: Add tests documenting error invariants (#62992) 2024-06-03 19:46:53 +08:00
go.sum chore: Add tests documenting error invariants (#62992) 2024-06-03 19:46:53 +08:00
README.md lib: Introduce non-enterprise lib directory (#18992) 2021-03-10 19:41:33 -06:00
tools.go bump to Go 1.22.1 (#60902) 2024-03-06 17:38:43 -07:00

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.