open-consul/lib
Daniel Nephin 8dc52a56ea config: add HookTranslteKeys
This hook replaces lib.TranslateKeys and has a number of advantages:

1. Primarily, aliases for fields are defined on the field itself, making
   the aliases much easier to maintain, and more obvious to the reader.
2. TranslateKeys translation rules are not aware of structure. It could
   very easily incorrectly translate a key on one struct that was intended
   to be a translation rule for a completely different struct, leading
   to very hard to debug errors. The hook removes the need for the
   unexpected "translation rule is an empty string to indicate stop
   traversal" special case.
3. TranslateKeys attempts to duplicate a bunch of tree traversal logic
   that already exists in mapstructure. Using mapstructure for traversal
   removes the need to traverse the entire structure multiple times, and
   makes the behaviour more obvious to the reader.

This change is being made to enable a future change of replacing
PatchSliceOfMaps. TranslateKeys sits in between PatchSliceOfMaps and
mapstructure.Decode, so it must be converted to a hook first, before
PatchSliceOfMaps can be replaced by a decode hook.
2020-05-27 16:24:47 -04:00
..
decode config: add HookTranslteKeys 2020-05-27 16:24:47 -04:00
file cli: improve the file safety of 'consul tls' subcommands (#7186) 2020-01-31 10:12:36 -06:00
semaphore
cluster.go
cluster_test.go
eof.go
json.go
map_walker.go
map_walker_test.go
math.go Filter wildcard gateway services to match listener protocol 2020-05-06 15:06:13 -05:00
math_test.go Filter wildcard gateway services to match listener protocol 2020-05-06 15:06:13 -05:00
patch_hcl.go Make PatchSliceOfMaps case insensitive 2020-01-31 09:56:02 -05:00
patch_hcl_test.go Make PatchSliceOfMaps case insensitive 2020-01-31 09:56:02 -05:00
path.go
rand.go
retry.go
retry_test.go
rtt.go
rtt_test.go
serf.go agent: fewer file local differences between enterprise and oss (#6820) (#6898) 2019-12-06 21:35:58 +01:00
slice.go agent: handle re-bootstrapping in a secondary datacenter when WAN federation via mesh gateways is configured (#7931) 2020-05-27 11:31:10 -05:00
slice_test.go agent: handle re-bootstrapping in a secondary datacenter when WAN federation via mesh gateways is configured (#7931) 2020-05-27 11:31:10 -05:00
stop_context.go
string.go
string_test.go
telemetry.go
telemetry_test.go
testing_httpserver.go cli: fix usage of gzip.Reader to better detect corrupt snapshots during save/restore (#7697) 2020-04-24 17:18:56 -05:00
translate.go connect: remove managed proxies (#6220) 2019-08-09 15:19:30 -04:00
translate_test.go
useragent.go
useragent_test.go
uuid.go