From b54acf4a0b705d325fda53f1fc9f2f5cdff2070c Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 15 Aug 2014 17:46:05 -0700 Subject: [PATCH] helper/schema: better docs --- helper/schema/resource_data.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/helper/schema/resource_data.go b/helper/schema/resource_data.go index d1057f813..52582e542 100644 --- a/helper/schema/resource_data.go +++ b/helper/schema/resource_data.go @@ -16,6 +16,10 @@ type ResourceData struct { } // Get returns the data for the given key, or nil if the key doesn't exist. +// +// The type of the data returned will be according to the schema specified. +// Primitives will be their respective types in Go, lists will always be +// []interface{}, and sub-resources will be map[string]interface{}. func (d *ResourceData) Get(key string) interface{} { parts := strings.Split(key, ".") return d.getObject("", parts, d.schema)