sourcegraph/internal/env
Jean-Hadrien Chabran ec34a909bc
chore(config): clarify env var already registered panic (#63784)
When `internal/env/env.Get` detects a difference in between already
registered descriptions, it panics (good). But the error message doesn't
tell you what's the difference and you're left out to put a few prints
for yourself in the code to try to understand what's wrong.

See also: https://github.com/sourcegraph/sourcegraph/pull/63786

Before:

<img width="1109" alt="image"
src="https://github.com/sourcegraph/sourcegraph/assets/10151/56b2d65c-ef87-4134-bfc0-67248aa48350">

After: 

![CleanShot 2024-07-11 at 15 26
13@2x](https://github.com/sourcegraph/sourcegraph/assets/10151/406bca90-2b87-481d-aad3-6550afaca29f)


## Test plan

CI + local run 

## Changelog

- When conflicting env var are detected, print the two to ease
debugging.
2024-07-11 13:59:29 +00:00
..
baseconfig.go all: run gofmt -s -w from 1.19 (#41629) 2022-09-13 07:44:06 +00:00
BUILD.bazel bazel: first pass at moving moving logging linting into nogo (#58910) 2024-01-02 10:07:25 -08:00
CODENOTIFY codenotify: dr. fritz is kil (#57313) 2023-10-03 16:19:55 +00:00
env_test.go allow duplicate env.Get registrations (#45871) 2022-12-21 06:10:57 +00:00
env.go chore(config): clarify env var already registered panic (#63784) 2024-07-11 13:59:29 +00:00