func (y *YAML) SetPassword(v string) {
	y.password = v
}
SetPassword updates the password
package secrets
import (
	"bufio"
	"bytes"
	"fmt"
	"io"
	"sort"
	"strings"
	"github.com/caspr-io/yamlpath"
	"github.com/gopasspw/gopass/internal/out"
	"github.com/gopasspw/gopass/pkg/debug"
	"github.com/gopasspw/gopass/pkg/gopass"
	yaml "gopkg.in/yaml.v3"
)
var _ gopass.Secret = &YAML{}
type YAML struct {
	password string
	data     map[string]interface{}
	body     string
}
func (y *YAML) Keys() []string {
	keys := make([]string, 0, len(y.data)+1)
	for key := range y.data {
		keys = append(keys, key)
	}
	sort.Strings(keys)
	return keys
}
func (y *YAML) Get(key string) (string, bool) {
	if y.data == nil {
		y.data = make(map[string]interface{})
	}
	if v, found := y.data[key]; found {
		return fmt.Sprintf("%v", v), found
	}
	if v, err := yamlpath.YamlPath(y.data, key); err == nil && v != nil {
		return fmt.Sprintf("%v", v), true
	}
	return "", false
}
func (y *YAML) Values(key string) ([]string, bool) {
	data, found := y.Get(key)
	return []string{data}, found
}
func (y *YAML) Set(key string, value interface{}) error {
	if y.data == nil {
		y.data = make(map[string]interface{}, 1)
	}
	y.data[key] = value
	return nil
}
func (y *YAML) Add(key string, value interface{}) error {
	return fmt.Errorf("not supported for YAML")
}
func (y *YAML) Del(key string) bool {
	_, found := y.data[key]
	delete(y.data, key)
	return found
}
func ParseYAML(in []byte) (*YAML, error) {
	y := &YAML{
		data: make(map[string]interface{}, 10),
	}
	debug.Log("Parsing %s", out.Secret(in))
	r := bufio.NewReader(bytes.NewReader(in))
	line, err := r.ReadString('\n')
	if err != nil {
		return nil, err
	}
	line = strings.TrimSpace(line)
	if line != "---" {
		y.password = line
		body, err := parseBody(r)
		if err != nil {
			return nil, err
		}
		y.body = body
	}
	if err := yaml.NewDecoder(r).Decode(y.data); err != nil && err != io.EOF {
		return nil, err
	}
	return y, nil
}
func (y *YAML) Body() string {
	return y.body
}
func (y *YAML) Password() string {
	return y.password
}