func (a *btcdArgs) String() string {
	return a.prefix
}
String returns a printable name of this instance
package main
import (
	"fmt"
	"io/ioutil"
	"log"
	"os"
	"os/exec"
	"strings"
	rpc "github.com/btcsuite/btcd/rpcclient"
	"github.com/btcsuite/btcd/wire"
)
type btcdArgs struct {
	RPCUser    string
	RPCPass    string
	Listen     string
	RPCListen  string
	RPCConnect string
	DataDir    string
	LogDir     string
	Profile    string
	DebugLevel string
	Extra      []string
	prefix       string
	exe          string
	endpoint     string
	certificates []byte
}
func newBtcdArgs(prefix string) (*btcdArgs, error) {
	a := &btcdArgs{
		Listen:    "127.0.0.1:18555",
		RPCListen: "127.0.0.1:18556",
		RPCUser:   "user",
		RPCPass:   "pass",
		prefix:   prefix,
		exe:      "btcd",
		endpoint: "ws",
	}
	if err := a.SetDefaults(); err != nil {
		return nil, err
	}
	return a, nil
}
func (a *btcdArgs) SetDefaults() error {
	datadir, err := ioutil.TempDir("", a.prefix+"-data")
	if err != nil {
		return err
	}
	a.DataDir = datadir
	logdir, err := ioutil.TempDir("", a.prefix+"-logs")
	if err != nil {
		return err
	}
	a.LogDir = logdir
	cert, err := ioutil.ReadFile(CertFile)
	if err != nil {
		return err
	}
	a.certificates = cert
	return nil
}