mirror of
https://github.com/hashicorp/vault.git
synced 2026-02-03 20:40:45 -05:00
We have many hand-written String() methods (and similar) for enums. These require more maintenance and are more error-prone than using automatically generated methods. In addition, the auto-generated versions can be more efficient. Here, we switch to using https://github.com/loggerhead/enumer, itself a fork of https://github.com/diegostamigni/enumer, no longer maintained, and a fork of the mostly standard tool https://pkg.go.dev/golang.org/x/tools/cmd/stringer. We use this fork of enumer for Go 1.20+ compatibility and because we require the `-transform` flag to be able to generate constants that match our current code base. Some enums were not targeted for this change: |
||
|---|---|---|
| .. | ||
| cacheboltdb | ||
| cachememdb | ||
| keymanager | ||
| api_proxy.go | ||
| api_proxy_test.go | ||
| cache_test.go | ||
| enforceconsistency_enumer.go | ||
| handler.go | ||
| lease_cache.go | ||
| lease_cache_test.go | ||
| listener.go | ||
| proxy.go | ||
| static_secret_cache_updater.go | ||
| static_secret_cache_updater_test.go | ||
| static_secret_capability_manager.go | ||
| static_secret_capability_manager_test.go | ||
| testing.go | ||
| wheninconsistentaction_enumer.go | ||