Merge pull request #20958 from calavera/basic_function_templates

Provide basic string manipulation functions for template executions.
Upstream-commit: 943ae26bc01913fefe415defc575ea10e24f6a2b
Component: engine
This commit is contained in:
Alexander Morozov
2016-03-10 08:08:32 -08:00
9 changed files with 155 additions and 23 deletions

View File

@ -8,9 +8,9 @@ import (
"os"
"path"
"strings"
"text/template"
"github.com/docker/docker/pkg/aaparser"
"github.com/docker/docker/utils/templates"
)
var (
@ -36,7 +36,7 @@ type profileData struct {
// generateDefault creates an apparmor profile from ProfileData.
func (p *profileData) generateDefault(out io.Writer) error {
compiled, err := template.New("apparmor_profile").Parse(baseTemplate)
compiled, err := templates.NewParse("apparmor_profile", baseTemplate)
if err != nil {
return err
}