Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.

Commit 82e4223

Browse files
committed
Remove check for template variables being passed to v1 template
1 parent e27e5c7 commit 82e4223

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

  • internals/secrethub/tpl

internals/secrethub/tpl/v1.go

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ import (
44
"github.com/secrethub/secrethub-cli/internals/tpl"
55
)
66

7-
// Errors
8-
var (
9-
ErrTemplateVarsNotSupported = tplError.Code("template_vars_not_supported").Error("the v1 template syntax does not support template variables")
10-
)
11-
127
// NewV1Parser returns a parser for the v1 template syntax.
138
//
149
// V1 templates can contain secret paths between ${}:
@@ -40,11 +35,7 @@ func (p parserV1) Parse(raw string, _, _ int) (Template, error) {
4035

4136
// InjectVars takes a map of template variables with their corresponding values. It replaces
4237
// the template variables with their values in the template.
43-
func (t templateV1) Evaluate(varReader VariableReader, sr SecretReader) (string, error) {
44-
if varReader != nil {
45-
return "", ErrTemplateVarsNotSupported
46-
}
47-
38+
func (t templateV1) Evaluate(_ VariableReader, sr SecretReader) (string, error) {
4839
keys := t.template.Keys()
4940
secrets := make(map[string]string, len(keys))
5041
for _, path := range keys {

0 commit comments

Comments
 (0)