func readConfigPath(p, src string, loader func(r io.Reader) error, loadedPath *string) error {
	p, _ = homedir.Expand(p)
	p, _ = filepath.Abs(p)

	triedPaths = append(triedPaths, p+" ("+src+")")

	f, err := fs.Open(p)
	if err != nil {
		return errConfigNotFound
	}

	err = loader(f)
	if err == nil {
		*loadedPath = p
	}

	return err
}
// Expands the given path and loads the configuration
Expands the given path and loads the configuration
// Expands the given path and loads the configuration
func readConfigPath(p, src string, loader func(r io.Reader) error, loadedPath *string) error {
	p, _ = homedir.Expand(p)
	p, _ = filepath.Abs(p)
	triedPaths = append(triedPaths, p+" ("+src+")")
	f, err := fs.Open(p)
	if err != nil {
		return errConfigNotFound
	}
	err = loader(f)
	if err == nil {
		*loadedPath = p
	}
	return err
}
func readConfigPath ( p , src string , loader func ( r io . Reader ) error , loadedPath * string ) error { p , _ = homedir . Expand ( p ) p , _ = filepath . Abs ( p ) triedPaths = append ( triedPaths , p + " " + src + " " ) f , err := fs . Open ( p ) if err != nil { return errConfigNotFound } err = loader ( f ) if err == nil { * loadedPath = p } return err }
Expands the given path and loads the configuration
Expands the given path and loads the configuration