mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-06 06:37:02 +02: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: |
||
---|---|---|
.. | ||
healthcheck.go | ||
pki_allow_acme_headers.go | ||
pki_allow_if_modified_since.go | ||
pki_audit_visibility.go | ||
pki_ca_validity_period.go | ||
pki_crl_validity_period.go | ||
pki_enable_acme_issuance.go | ||
pki_enable_auto_tidy.go | ||
pki_hardware_backed_root.go | ||
pki_role_allows_glob_wildcards.go | ||
pki_role_allows_localhost.go | ||
pki_role_no_store_false.go | ||
pki_root_issued_leaves.go | ||
pki_tidy_last_run.go | ||
pki_too_many_certs.go | ||
pki.go | ||
resultstatus_enumer.go | ||
shared.go | ||
util.go |