func (f *File) Deref(ref string) (string, error) {
	if f.ExpandHome && strings.HasPrefix(ref, "~/") {
		u, err := user.Current()
		if err != nil {
			return "", errors.New("failed to get current user: " + err.Error())
		}
		ref = filepath.Join(u.HomeDir, ref[2:])
	}
	b, err := ioutil.ReadFile(ref)
	if err != nil {
		return "", err
	}
	return string(b), nil
}
// Deref treats ref as path to a file and returns the content of the file.
Deref treats ref as path to a file and returns the content of the file.
// Deref treats ref as path to a file and returns the content of the file .
func (f *File) Deref(ref string) (string, error) {
	if f.ExpandHome && strings.HasPrefix(ref, "~/") {
		u, err := user.Current()
		if err != nil {
			return "", errors.New("failed to get current user: " + err.Error())
		}
		ref = filepath.Join(u.HomeDir, ref[2:])
	}
	b, err := ioutil.ReadFile(ref)
	if err != nil {
		return "", err
	}
	return string(b), nil
}
func ( f * File ) Deref ( ref string ) ( string , error ) { if f . ExpandHome && strings . HasPrefix ( ref , " " ) { u , err := user . Current ( ) if err != nil { return " " , errors . New ( " " + err . Error ( ) ) } ref = filepath . Join ( u . HomeDir , ref [ 2 : ] ) } b , err := ioutil . ReadFile ( ref ) if err != nil { return " " , err } return string ( b ) , nil }
Deref treats ref as path to a file and returns the content of the file.
Deref treats ref as path to a file and returns the content of the file .