|
|
@ -21,7 +21,6 @@ import (
|
|
|
|
"encoding/json"
|
|
|
|
"encoding/json"
|
|
|
|
"fmt"
|
|
|
|
"fmt"
|
|
|
|
"io/ioutil"
|
|
|
|
"io/ioutil"
|
|
|
|
"log"
|
|
|
|
|
|
|
|
"net/http"
|
|
|
|
"net/http"
|
|
|
|
|
|
|
|
|
|
|
|
"github.com/ghodss/yaml"
|
|
|
|
"github.com/ghodss/yaml"
|
|
|
@ -141,8 +140,6 @@ func (e *expander) ExpandTemplate(t *common.Template) (*ExpandedTemplate, error)
|
|
|
|
|
|
|
|
|
|
|
|
t.Imports = append(t.Imports, newImp...)
|
|
|
|
t.Imports = append(t.Imports, newImp...)
|
|
|
|
|
|
|
|
|
|
|
|
log.Printf("Got Imports as %#v", t.Imports)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for {
|
|
|
|
for {
|
|
|
|
// Now expand with everything imported.
|
|
|
|
// Now expand with everything imported.
|
|
|
|
result, err := e.expandTemplate(t)
|
|
|
|
result, err := e.expandTemplate(t)
|
|
|
@ -169,7 +166,6 @@ func (e *expander) ExpandTemplate(t *common.Template) (*ExpandedTemplate, error)
|
|
|
|
// If the new imports contain nothing, we are done. Everything is fully expanded.
|
|
|
|
// If the new imports contain nothing, we are done. Everything is fully expanded.
|
|
|
|
if len(newImp) == 0 {
|
|
|
|
if len(newImp) == 0 {
|
|
|
|
result.Layout = finalLayout
|
|
|
|
result.Layout = finalLayout
|
|
|
|
log.Printf("Returning config as %#v", result)
|
|
|
|
|
|
|
|
return result, nil
|
|
|
|
return result, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|