func LoadConfigFile(path string, collectors []string) (*Configuration, error) {
	var configs Configuration
	file, err := os.Open(path)
	if err != nil {
		return nil, fmt.Errorf("could not open config file %q: %v", path, err)
	}
	defer file.Close()
	decoder := yaml.NewDecoder(file)
	if err = decoder.Decode(&configs); err != nil {
		return nil, fmt.Errorf("could not parse config file %q: %v", path, err)
	}
	if err := parseConfig(&configs, collectors); err != nil {
		return nil, fmt.Errorf("%v", err)
	}
	return &configs, nil
}
LoadConfigFile returns a Configs type from a passed file.
package config
import (
	"fmt"
	"io/ioutil"
	"os"
	"golang.org/x/crypto/ssh"
	yaml "gopkg.in/yaml.v2"
)
type Configuration struct {
	Config map[string]Config `yaml:"configs"`
	Global Global            `yaml:"global"`
}
type Config struct {
	Username            string   `yaml:"username"`
	Timeout             int      `yaml:"timeout"`
	Password            string   `yaml:"password"`
	SSHKey              string   `yaml:"ssh_key"`
	AllowedTargets      []string `yaml:"allowed_targets"`
	Collectors          []string `yaml:"enabled_collectors"`
	InterfaceDescKeys   []string `yaml:"interface_description_keys"`
	InterfaceMetricKeys []string `yaml:"interface_metric_keys"`
	BGPTypeKeys         []string `yaml:"bgp_peer_type_keys"`
}
type Global struct {
	AllowedTargets      []string `yaml:"allowed_targets"`
	Timeout             int      `yaml:"timeout"`
	InterfaceDescKeys   []string `yaml:"interface_description_keys"`
	InterfaceMetricKeys []string `yaml:"interface_metric_keys"`
	BGPTypeKeys         []string `yaml:"bgp_peer_type_keys"`
}