mirror of
https://github.com/FlipsideCrypto/convox.git
synced 2026-02-06 10:56:56 +00:00
remove unused gcp code for packr
This commit is contained in:
parent
9e5e9ba3f6
commit
4f844b3281
@ -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
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user