Make parsing methods local
The parsing methods are used only internally; they must not be
exposed to users outside the respective packages.
diff --git a/openstack/orchestration/v1/stacks/template.go b/openstack/orchestration/v1/stacks/template.go
index b54fe52..32fe95b 100644
--- a/openstack/orchestration/v1/stacks/template.go
+++ b/openstack/orchestration/v1/stacks/template.go
@@ -38,7 +38,7 @@
// parameter of the template structure. This is the only way that a user can
// use child templates that are located in their filesystem; urls located on the
// web (e.g. on github or swift) can be fetched directly by Heat engine.
-func (t *Template) GetFileContents(te interface{}, ignoreIf igFunc, recurse bool) error {
+func (t *Template) getFileContents(te interface{}, ignoreIf igFunc, recurse bool) error {
// initialize template if empty
if t.Files == nil {
t.Files = make(map[string]string)
@@ -57,7 +57,7 @@
value, ok := v.(string)
if !ok {
// if the value is not a string, recursively parse that value
- if err := t.GetFileContents(v, ignoreIf, recurse); err != nil {
+ if err := t.getFileContents(v, ignoreIf, recurse); err != nil {
return err
}
} else if !ignoreIf(k, value) {
@@ -87,7 +87,7 @@
// required if the child template itself contains references to
// other templates
if recurse {
- if err := childTemplate.GetFileContents(childTemplate.Parsed, ignoreIf, recurse); err != nil {
+ if err := childTemplate.getFileContents(childTemplate.Parsed, ignoreIf, recurse); err != nil {
return err
}
}
@@ -103,7 +103,7 @@
case []interface{}:
te_slice := te.([]interface{})
for i := range te_slice {
- if err := t.GetFileContents(te_slice[i], ignoreIf, recurse); err != nil {
+ if err := t.getFileContents(te_slice[i], ignoreIf, recurse); err != nil {
return err
}
}