1
0
Fork 0

refactor: applies linting.

This commit is contained in:
Ludovic Fernandez 2019-02-05 17:10:03 +01:00 committed by Traefiker Bot
parent 54ca0ce34f
commit 115ddc6a4a
20 changed files with 111 additions and 111 deletions

View file

@ -2,13 +2,11 @@ package provider
import (
"bytes"
"io/ioutil"
"strings"
"text/template"
"github.com/BurntSushi/toml"
"github.com/Masterminds/sprig"
"github.com/containous/traefik/autogen/gentemplates"
"github.com/containous/traefik/config"
"github.com/containous/traefik/log"
"github.com/containous/traefik/types"
@ -88,26 +86,6 @@ func (p *BaseProvider) DecodeConfiguration(content string) (*config.Configuratio
return configuration, nil
}
func (p *BaseProvider) getTemplateContent(defaultTemplateFile string) (string, error) {
if len(p.Filename) > 0 {
buf, err := ioutil.ReadFile(p.Filename)
if err != nil {
return "", err
}
return string(buf), nil
}
if strings.HasSuffix(defaultTemplateFile, ".tmpl") {
buf, err := gentemplates.Asset(defaultTemplateFile)
if err != nil {
return "", err
}
return string(buf), nil
}
return defaultTemplateFile, nil
}
func split(sep, s string) []string {
return strings.Split(s, sep)
}