// Get is the function that will be called from inside of the templatefile.
// You need to use following scheme to get secrets substituted:
//  {{ .Get "path/to/secret" }}
Get is the function that will be called from inside of the templatefile.
You need to use following scheme to get secrets substituted:
{{ .Get "path/to/secret" }}
// Get is the function that will be called from inside of the templatefile . // You need to use following scheme to get secrets substituted : // {{ . Get " path / to / secret " }}
func (s secret) Get(filepath string) (string, error) {
	sto := *store.GetStore()
	sec, err := sto.GetSecret(filepath, *s.ctx)
	if err != nil {
		return "", err
	}
	if sec.Content == "" {
		return "", fmt.Errorf("msg=\"content of secret is empty\" secret=\"%v\"\n", filepath)
	}
	return sec.Content, nil
}
func ( s secret ) Get ( filepath string ) ( string , error ) { sto := * store . GetStore ( ) sec , err := sto . GetSecret ( filepath , * s . ctx ) if err != nil { return " " , err } if sec . Content == " " { return " " , fmt . Errorf ( " \" \" \" \" \n " , filepath ) } return sec . Content , nil }
Get is the function that will be called from inside of the templatefile.
Get is the function that will be called from inside of the templatefile .