func (c *Config) ConfigMap() map[string]string {
	m := make(map[string]string, 20)
	o := reflect.ValueOf(c).Elem()
	for i := 0; i < o.NumField(); i++ {
		jsonArg := o.Type().Field(i).Tag.Get("yaml")
		if jsonArg == "" || jsonArg == "-" {
			continue
		}
		f := o.Field(i)
		var strVal string
		switch f.Kind() {
		case reflect.String:
			strVal = f.String()
		case reflect.Bool:
			strVal = fmt.Sprintf("%t", f.Bool())
		case reflect.Int:
			strVal = fmt.Sprintf("%d", f.Int())
		default:
			continue
		}
		m[jsonArg] = strVal
	}
	return m
}
ConfigMap returns a map of stringified config values for easy printing
package config
import (
	"fmt"
	"path/filepath"
	"reflect"
	"strconv"
	"strings"
)
var (
	ErrConfigNotFound = fmt.Errorf("config not found")
	ErrConfigNotParsed = fmt.Errorf("config not parseable")
)
type Config struct {
	AutoClip      bool              `yaml:"autoclip"`       
	AutoImport    bool              `yaml:"autoimport"`     
	ClipTimeout   int               `yaml:"cliptimeout"`    
	ExportKeys    bool              `yaml:"exportkeys"`     
	NoPager       bool              `yaml:"nopager"`        
	Notifications bool              `yaml:"notifications"`  
	Parsing       bool              `yaml:"parsing"`        
	Path          string            `yaml:"path"`
	SafeContent   bool              `yaml:"safecontent"`  
	Mounts        map[string]string `yaml:"mounts"`
	ConfigPath string `yaml:"-"`
	XXX map[string]interface{} `yaml:",inline"`
}
func New() *Config {
	return &Config{
		AutoImport:    true,
		ClipTimeout:   45,
		ExportKeys:    true,
		Mounts:        make(map[string]string),
		Notifications: true,
		Parsing:       true,
		Path:          PwStoreDir(""),
		ConfigPath:    configLocation(),
	}
}
func (c *Config) CheckOverflow() error {
	return checkOverflow(c.XXX)
}
func (c *Config) Config() *Config {
	return c
}
func (c *Config) SetConfigValue(key, value string) error {
	if err := c.setConfigValue(key, value); err != nil {
		return err
	}
	return c.Save()
}
func (c *Config) setConfigValue(key, value string) error {
	value = strings.ToLower(value)
	o := reflect.ValueOf(c).Elem()
	for i := 0; i < o.NumField(); i++ {
		jsonArg := o.Type().Field(i).Tag.Get("yaml")
		if jsonArg == "" || jsonArg == "-" {
			continue
		}
		if jsonArg != key {
			continue
		}
		f := o.Field(i)
		switch f.Kind() {
		case reflect.String:
			f.SetString(value)
			return nil
		case reflect.Bool:
			if value == "true" || value == "on" {
				f.SetBool(true)
				return nil
			} else if value == "false" || value == "off" {
				f.SetBool(false)
				return nil
			} else {
				return fmt.Errorf("not a bool: %s", value)
			}
		case reflect.Int:
			iv, err := strconv.Atoi(value)
			if err != nil {
				return fmt.Errorf("failed to convert %q to integer: %w", value, err)
			}
			f.SetInt(int64(iv))
			return nil
		default:
			continue
		}
	}
	return fmt.Errorf("unknown config option %q", key)
}
func (c *Config) String() string {
	return fmt.Sprintf("%#v", c)
}
func (c *Config) Directory() string {
	return filepath.Dir(c.Path)
}