Move docker provider to its own package 👼

Makes it simpler to manage :)

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester 2017-04-15 15:49:53 +02:00
parent dc01094863
commit 3f293ee25b
17 changed files with 163 additions and 161 deletions

View file

@ -51,7 +51,7 @@ func (p *BaseProvider) MatchConstraints(tags []string) (bool, *types.Constraint)
return true, nil
}
func (p *BaseProvider) getConfiguration(defaultTemplateFile string, funcMap template.FuncMap, templateObjects interface{}) (*types.Configuration, error) {
func (p *BaseProvider) GetConfiguration(defaultTemplateFile string, funcMap template.FuncMap, templateObjects interface{}) (*types.Configuration, error) {
var (
buf []byte
err error
@ -60,7 +60,7 @@ func (p *BaseProvider) getConfiguration(defaultTemplateFile string, funcMap temp
var defaultFuncMap = template.FuncMap{
"replace": replace,
"tolower": strings.ToLower,
"normalize": normalize,
"Normalize": Normalize,
"split": split,
"contains": contains,
}
@ -112,7 +112,7 @@ func split(sep, s string) []string {
return strings.Split(s, sep)
}
func normalize(name string) string {
func Normalize(name string) string {
fargs := func(c rune) bool {
return !unicode.IsLetter(c) && !unicode.IsNumber(c)
}