// Prepare gathers the pre-requisites information and form it in usable form.
Prepare gathers the pre-requisites information and form it in usable form.
// Prepare gathers the pre - requisites information and form it in usable form .
func (r *Resource) Prepare(rawConfig map[string]interface{}) error {
	var c Config
	var md mapstructure.Metadata
	if err := mapstructure.DecodeMetadata(rawConfig, &c, &md); err != nil {
		return err
	}
	r.Config = c
	r.Config.SrcAmiInfo = prepareSrcAmiInfo(r.Config.Source)
	return nil
}
func ( r * Resource ) Prepare ( rawConfig map [ string ] interface { } ) error { var c Config var md mapstructure . Metadata if err := mapstructure . DecodeMetadata ( rawConfig , & c , & md ) ; err != nil { return err } r . Config = c r . Config . SrcAmiInfo = prepareSrcAmiInfo ( r . Config . Source ) return nil }
Prepare gathers the pre-requisites information and form it in usable form.
Prepare gathers the pre - requisites information and form it in usable form .