Replace template with yamltemplate

Signed-off-by: Tiffany Pei <peip@google.com>
pull/12500/head
Tiffany Pei 2 years ago
parent c5d78b89d1
commit ddd98a4955

@ -18,7 +18,8 @@ package main
import ( import (
"io" "io"
"text/template"
template "github.com/google/safetext/yamltemplate"
) )
func tpl(t string, vals map[string]interface{}, out io.Writer) error { func tpl(t string, vals map[string]interface{}, out io.Writer) error {

@ -19,7 +19,8 @@ package main
import ( import (
"fmt" "fmt"
"io" "io"
"text/template"
template "github.com/google/safetext/yamltemplate"
"github.com/spf13/cobra" "github.com/spf13/cobra"

@ -17,6 +17,7 @@ require (
github.com/foxcpp/go-mockdns v1.0.0 github.com/foxcpp/go-mockdns v1.0.0
github.com/gobwas/glob v0.2.3 github.com/gobwas/glob v0.2.3
github.com/gofrs/flock v0.8.1 github.com/gofrs/flock v0.8.1
github.com/google/safetext v0.0.0-20230106111101-7156a760e523
github.com/gosuri/uitable v0.0.4 github.com/gosuri/uitable v0.0.4
github.com/hashicorp/go-multierror v1.1.1 github.com/hashicorp/go-multierror v1.1.1
github.com/jmoiron/sqlx v1.3.5 github.com/jmoiron/sqlx v1.3.5

@ -171,6 +171,8 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec=
github.com/google/safetext v0.0.0-20230106111101-7156a760e523 h1:i4NsbmB9pD5+Ggp5GZKyvYY6MkjvPE8CIMlkvXFF8gA=
github.com/google/safetext v0.0.0-20230106111101-7156a760e523/go.mod h1:mJNEy0r5YPHC7ChQffpOszlGB4L1iqjXWpIEKcFpr9s=
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4=
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=

@ -27,10 +27,11 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"sync" "sync"
"text/template"
"time" "time"
"github.com/Masterminds/sprig/v3" "github.com/Masterminds/sprig/v3"
template "github.com/google/safetext/yamltemplate"
"github.com/pkg/errors" "github.com/pkg/errors"
v1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors" apierrors "k8s.io/apimachinery/pkg/api/errors"

@ -20,7 +20,8 @@ import (
"bytes" "bytes"
"fmt" "fmt"
"testing" "testing"
"text/template"
template "github.com/google/safetext/yamltemplate"
"helm.sh/helm/v3/pkg/chart" "helm.sh/helm/v3/pkg/chart"
) )

@ -24,7 +24,8 @@ import (
"regexp" "regexp"
"sort" "sort"
"strings" "strings"
"text/template"
template "github.com/google/safetext/yamltemplate"
"github.com/pkg/errors" "github.com/pkg/errors"
"k8s.io/client-go/rest" "k8s.io/client-go/rest"

@ -22,7 +22,8 @@ import (
"strings" "strings"
"sync" "sync"
"testing" "testing"
"text/template"
template "github.com/google/safetext/yamltemplate"
"helm.sh/helm/v3/pkg/chart" "helm.sh/helm/v3/pkg/chart"
"helm.sh/helm/v3/pkg/chartutil" "helm.sh/helm/v3/pkg/chartutil"

@ -20,7 +20,8 @@ import (
"bytes" "bytes"
"encoding/json" "encoding/json"
"strings" "strings"
"text/template"
template "github.com/google/safetext/yamltemplate"
"github.com/BurntSushi/toml" "github.com/BurntSushi/toml"
"github.com/Masterminds/sprig/v3" "github.com/Masterminds/sprig/v3"

@ -19,7 +19,8 @@ package engine
import ( import (
"strings" "strings"
"testing" "testing"
"text/template"
template "github.com/google/safetext/yamltemplate"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

Loading…
Cancel
Save