func LoadMap(c interface{}, vars map[string]interface{}, conf Conf) error {
	conf.EnvDisable = true
	conf.FlagDisable = true
	return LoadWithMap(c, vars, conf)
}
LoadWithMap loads the configuration of your program in the struct at c
by using the given map.  All other config sources will be ignored.
Use conf to specify how gonfig should look for configuration variables.

Read documentation of Load for effects.
package gonfig
import (
	"fmt"
	"path/filepath"
	"reflect"
)
type Conf struct {
	ConfigFileVariable string
	FileDisable bool
	FileDefaultFilename string
	FileDecoder FileDecoderFn
	FlagDisable bool
	FlagIgnoreUnknown bool
	EnvDisable bool
	EnvPrefix string
	HelpDisable bool
	HelpMessage string
	HelpDescription string
}
type setup struct {
	conf *Conf
	opts    []*option  
	allOpts []*option  
	configFilePath   string
	customConfigFile bool  
}
func findCustomConfigFile(s *setup) (string, error) {
	if s.conf.ConfigFileVariable == "" {
		return "", nil
	}
	var configOpt *option
	for _, opt := range s.opts {
		if opt.id == s.conf.ConfigFileVariable {
			configOpt = opt
			break
		}
	}
	if configOpt == nil {
		panic(fmt.Errorf("config variable name provided (%v), "+
			"but not defined in config struct", s.conf.ConfigFileVariable))
	}
	path, err := lookupConfigFileFlag(s, configOpt)
	if err != nil {
		return "", err
	}
	if path != "" {
		return filepath.Abs(path)
	}
	path, err = lookupConfigFileEnv(s, configOpt)
	if err != nil {
		return "", err
	}
	if path != "" {
		return filepath.Abs(path)
	}
	return "", nil
}
func setDefaults(s *setup) error {
	for _, opt := range s.allOpts {
		if !opt.defaultSet {
			continue
		}
		if opt.isParent {
			return fmt.Errorf("default value specified for nested value '%v'",
				opt.fullID())
		}
		if !isZero(opt.value) {
			continue
		}
		opt.defaultValue = reflect.New(opt.value.Type()).Elem()
		if isSlice(opt.value) {
			if err := parseSlice(opt.defaultValue, opt.defaul); err != nil {
				return fmt.Errorf(
					"error parsing default value for %v: %v", opt.fullID(), err)
			}
		} else {
			if err := parseSimpleValue(opt.defaultValue, opt.defaul); err != nil {
				return fmt.Errorf(
					"error parsing default value for %v: %v", opt.fullID(), err)
			}
		}
		if err := setValue(opt.value, opt.defaultValue); err != nil {
			return fmt.Errorf("error setting default value for option "+
				"'%v' to '%v': %v", opt.id, opt.defaultValue, err)
		}
	}
	return nil
}
func Load(c interface{}, conf Conf) error {
	s := &setup{
		conf: &conf,
	}
	if err := inspectConfigStructure(s, c); err != nil {
		panic(fmt.Errorf("error in config structure: %v", err))
	}
	if err := setDefaults(s); err != nil {
		panic(fmt.Errorf("error in default values: %v", err))
	}
	if !s.conf.FileDisable {
		filename, err := findCustomConfigFile(s)
		if err != nil {
			return err
		}
		if filename != "" {
			s.customConfigFile = true
		} else {
			s.customConfigFile = false
			if s.conf.FileDefaultFilename != "" {
				filename, err = filepath.Abs(s.conf.FileDefaultFilename)
				if err != nil {
					return fmt.Errorf("failed to convert default config file "+
						"location to an absolute path: %v", err)
				}
			}
		}
		if filename != "" {
			s.configFilePath = filename
			if err := parseFile(s); err != nil {
				return err
			}
		}
	}
	if !s.conf.EnvDisable {
		if err := parseEnv(s); err != nil {
			return err
		}
	}
	if !s.conf.FlagDisable {
		if err := parseFlags(s); err != nil {
			return err
		}
	}
	return nil
}
func LoadRawFile(c interface{}, fileContent []byte, conf Conf) error {
	conf.EnvDisable = true
	conf.FlagDisable = true
	return LoadWithRawFile(c, fileContent, conf)
}
func LoadWithRawFile(c interface{}, fileContent []byte, conf Conf) error {
	s := &setup{
		conf: &conf,
	}
	if err := inspectConfigStructure(s, c); err != nil {
		panic(fmt.Errorf("config: error in structure: %v", err))
	}
	if err := setDefaults(s); err != nil {
		panic(fmt.Errorf("config: error in default values: %v", err))
	}
	if s.conf.FileDisable {
		panic("config: can't use LoadWithRawFile with DisableFile set to true")
	}
	if err := parseFileContent(s, fileContent); err != nil {
		return err
	}
	if !s.conf.EnvDisable {
		if err := parseEnv(s); err != nil {
			return err
		}
	}
	if !s.conf.FlagDisable {
		if err := parseFlags(s); err != nil {
			return err
		}
	}
	return nil
}