func NewConfig() (*Config, error) {
	curUser, err := user.Current()
	if err != nil {
		return nil, err
	}
	if _, err := os.Stat(filepath.Join(curUser.HomeDir, NetrcDefaultFilename)); os.IsNotExist(err) {
		return nil, fmt.Errorf("$HOME/.netrc does not exist")
	}
	return &Config{
		User:     curUser,
		Filename: NetrcDefaultFilename,
	}, nil
}
NewConfig returns a new configuration structure for the netrc authenticator.
package auth
import (
	"fmt"
	"os"
	"os/user"
	"path/filepath"
	"github.com/jdxcode/netrc"
)
const (
	NetrcUsernameField string = "login"
	NetrcPasswordField string = "password"
	NetrcDefaultFilename string = ".netrc"
)
type Interface interface {
	GetUsernamePassword(host string) (string, string, error)
}
type Config struct {
	User     *user.User
	Filename string
}