open-consul/command/config
R.B. Boyer 6bf4255cdc
command: ensure that the json form of config entries can be submitted with 'consul config write' (#6290)
The json decoder inside of the HCLv1 hcl.Decode function behaves
unexpectedly when decoding generically into a map[string]interface{} as
is done for 'consul config write' pre-submit decoding.

This results in some subtle (service-router Match and Destinations being
separated) and some not so subtle (service-resolver subsets and failover
panic if multiple subsets are referenced) bugs when subsequently passed
through mapstructure to finish decoding.

Given that HCLv1 is basically frozen and the HCL part of it is fine
instead of trying to figure out what the underlying bug is in the json
decoder for our purposes just sniff the byte slice and selectively use
the stdlib json decoder for JSON and hcl decoder for HCL.
2019-08-07 16:41:33 -05:00
..
delete Centralized Config CLI (#5731) 2019-04-30 16:27:16 -07:00
list Centralized Config CLI (#5731) 2019-04-30 16:27:16 -07:00
read adding new config entries for L7 discovery chain (unused) (#5987) 2019-06-27 12:37:43 -05:00
write command: ensure that the json form of config entries can be submitted with 'consul config write' (#6290) 2019-08-07 16:41:33 -05:00
config.go adding new config entries for L7 discovery chain (unused) (#5987) 2019-06-27 12:37:43 -05:00