remove unused gcp code for packr

This commit is contained in:
David Dollar 2020-01-28 11:21:13 -05:00
parent 9e5e9ba3f6
commit 4f844b3281
No known key found for this signature in database
GPG Key ID: AFAF263FB45B2124
2 changed files with 2 additions and 16 deletions

View File

@ -8,9 +8,7 @@ import (
"cloud.google.com/go/storage"
"github.com/convox/convox/pkg/elastic"
"github.com/convox/convox/pkg/structs"
"github.com/convox/convox/pkg/templater"
"github.com/convox/convox/provider/k8s"
"github.com/gobuffalo/packr"
)
type Provider struct {
@ -22,9 +20,8 @@ type Provider struct {
Region string
Registry string
elastic *elastic.Client
storage *storage.Client
templater *templater.Templater
elastic *elastic.Client
storage *storage.Client
}
func FromEnv() (*Provider, error) {
@ -48,8 +45,6 @@ func FromEnv() (*Provider, error) {
p.Key = key
p.templater = templater.New(packr.NewBox("../gcp/template"), p.templateHelpers())
k.Engine = p
return p, nil

View File

@ -7,15 +7,6 @@ import (
"github.com/convox/convox/pkg/common"
)
func (p *Provider) RenderTemplate(name string, params map[string]interface{}) ([]byte, error) {
data, err := p.templater.Render(fmt.Sprintf("%s.yml.tmpl", name), params)
if err != nil {
return nil, err
}
return common.FormatYAML(data)
}
func (p *Provider) templateHelpers() template.FuncMap {
return template.FuncMap{
"coalesce": func(ss ...string) string {