From 6420e4bd81f916b4e8ade12b7cf2ea0647165c3a Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 12 Jun 2014 17:27:53 -0700 Subject: [PATCH] config: reorder --- config/raw_config.go | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/config/raw_config.go b/config/raw_config.go index 2b0aefbb5..71662a65d 100644 --- a/config/raw_config.go +++ b/config/raw_config.go @@ -42,6 +42,21 @@ func NewRawConfig(raw map[string]interface{}) (*RawConfig, error) { }, nil } +// Config returns the entire configuration with the variables +// interpolated from any call to Interpolate. +// +// If any interpolated variables are unknown (value set to +// UnknownVariableValue), the first non-container (map, slice, etc.) element +// will be removed from the config. The keys of unknown variables +// can be found using the UnknownKeys function. +// +// By pruning out unknown keys from the configuration, the raw +// structure will always successfully decode into its ultimate +// structure using something like mapstructure. +func (r *RawConfig) Config() map[string]interface{} { + return r.config +} + // Interpolate uses the given mapping of variable values and uses // those as the values to replace any variables in this raw // configuration. @@ -66,21 +81,6 @@ func (r *RawConfig) Interpolate(vs map[string]string) error { return nil } -// Config returns the entire configuration with the variables -// interpolated from any call to Interpolate. -// -// If any interpolated variables are unknown (value set to -// UnknownVariableValue), the first non-container (map, slice, etc.) element -// will be removed from the config. The keys of unknown variables -// can be found using the UnknownKeys function. -// -// By pruning out unknown keys from the configuration, the raw -// structure will always successfully decode into its ultimate -// structure using something like mapstructure. -func (r *RawConfig) Config() map[string]interface{} { - return r.config -} - // UnknownKeys returns the keys of the configuration that are unknown // because they had interpolated variables that must be computed. func (r *RawConfig) UnknownKeys() []string {