func (n *Node) ConfigWithErr(commands ...string) error {
	commands = append([]string{"configure terminal"}, commands...)
	_, err := n.RunCommands(commands, "json")
	if n.autoRefresh {
		n.Refresh()
	}
	return err
}
ConfigWithErr the node with the specified commands

This method is used to send configuration commands to the node.
It will takes a list of strings and prepend the necessary commands
to put the session into config mode. Returns error if issues arise.
package goeapi
import (
	"fmt"
	"os"
	"os/user"
	"path/filepath"
	"regexp"
	"strconv"
	"strings"
	"github.com/vaughan0/go-ini"
)
const (
	RunningConfig = "running-config"
	StartupConfig = "startup-config"
)
type Node struct {
	conn          EapiConnectionEntity
	runningConfig string
	startupConfig string
	autoRefresh   bool
	enablePasswd  string
}
func (n *Node) GetConnection() EapiConnectionEntity {
	if n == nil {
		return nil
	}
	return n.conn
}
func (n *Node) SetConnection(c EapiConnectionEntity) {
	if n == nil {
		return
	}
	n.conn = c
}
func (n *Node) SetAutoRefresh(val bool) {
	n.autoRefresh = val
}
func (n *Node) EnableAuthentication(passwd string) {
	n.enablePasswd = strings.TrimSpace(passwd)
}
func (n *Node) RunningConfig() string {
	if n.runningConfig != "" {
		return n.runningConfig
	}
	n.runningConfig, _ = n.getConfigText(RunningConfig, "all")
	return n.runningConfig
}
func (n *Node) StartupConfig() string {
	if n.startupConfig != "" {
		return n.startupConfig
	}
	n.startupConfig, _ = n.getConfigText(StartupConfig, "")
	return n.startupConfig
}
func (n *Node) Refresh() {
	n.runningConfig = ""
	n.runningConfig = ""
}
func GetHandle(n *Node, encoding string) (*EapiReqHandle, error) {
	if strings.ToLower(encoding) != "json" &&
		strings.ToLower(encoding) != "text" {
		return nil, fmt.Errorf("Invalid encoding specified: %s", encoding)
	}
	if n == nil {
		return nil, fmt.Errorf("Invalid node")
	}
	return &EapiReqHandle{node: n, encoding: encoding}, nil
}
func (n *Node) GetHandle(encoding string) (*EapiReqHandle, error) {
	return GetHandle(n, encoding)
}
func (n *Node) GetConfig(config, params, encoding string) (map[string]interface{}, error) {
	if config != RunningConfig && config != StartupConfig {
		return nil, fmt.Errorf("Invalid config type: %s", config)
	}
	commands := []string{strings.TrimSpace("show " + config + " " + params)}
	result, err := n.RunCommands(commands, encoding)
	if err != nil {
		return nil, err
	}
	return result.Result[0], nil
}
func (n *Node) getConfigText(config, params string) (string, error) {
	result, err := n.GetConfig(config, params, "text")
	if err != nil {
		return "", err
	}
	return strings.TrimSpace(result["output"].(string)), nil
}
func (n *Node) GetSection(regex string, config string) (string, error) {
	var params string
	if config == "" || config == RunningConfig {
		config = RunningConfig
		params = "all"
	}
	if config != RunningConfig && config != StartupConfig {
		return "", fmt.Errorf("Invalid config type: %s", config)
	}
	sectionRegex, err := regexp.Compile(regex)
	if err != nil {
		return "", fmt.Errorf("Invalid regexp")
	}
	config, err = n.getConfigText(config, params)
	if err != nil || config == "" {
		return "", err
	}
	match := sectionRegex.FindStringIndex(config)
	if match == nil {
		return "", fmt.Errorf("Config section not found %d", match)
	}
	blockStart := match[0]
	lineEnd := match[1]
	blockRegex := regexp.MustCompile(`(?m)^[^\s]`)
	match = blockRegex.FindStringIndex(config[lineEnd:])
	if match == nil {
		return "", fmt.Errorf("Block section/end not found")
	}
	blockEnd := match[0]
	blockEnd = lineEnd + blockEnd
	return config[blockStart:blockEnd], nil
}