func (a *btcdArgs) Arguments() []string {
	args := []string{}
	args = append(args, fmt.Sprintf("--%s", strings.ToLower(wire.SimNet.String())))
	if a.RPCUser != "" {
		args = append(args, fmt.Sprintf("--rpcuser=%s", a.RPCUser))
	}
	if a.RPCPass != "" {
		args = append(args, fmt.Sprintf("--rpcpass=%s", a.RPCPass))
	}
	if a.Listen != "" {
		args = append(args, fmt.Sprintf("--listen=%s", a.Listen))
	}
	if a.RPCListen != "" {
		args = append(args, fmt.Sprintf("--rpclisten=%s", a.RPCListen))
	}
	if a.RPCConnect != "" {
		args = append(args, fmt.Sprintf("--rpcconnect=%s", a.RPCConnect))
	}
	args = append(args, fmt.Sprintf("--rpccert=%s", CertFile))
	args = append(args, fmt.Sprintf("--rpckey=%s", KeyFile))
	if a.DataDir != "" {
		args = append(args, fmt.Sprintf("--datadir=%s", a.DataDir))
	}
	if a.LogDir != "" {
		args = append(args, fmt.Sprintf("--logdir=%s", a.LogDir))
	}
	if a.Profile != "" {
		args = append(args, fmt.Sprintf("--profile=%s", a.Profile))
	}
	if a.DebugLevel != "" {
		args = append(args, fmt.Sprintf("--debuglevel=%s", a.DebugLevel))
	}
	args = append(args, a.Extra...)
	return args
}
Arguments returns an array of arguments that be used to launch the
btcd 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
}
func (a *btcdArgs) String() string {
	return a.prefix
}