// LoadConfig loads config file in YAML format.
LoadConfig loads config file in YAML format.
// LoadConfig loads config file in YAML format .
func LoadConfig(configFile string) (*LastPassConfig, error) {
	config := &LastPassConfig{}
	f, err := ioutil.ReadFile(configFile)
	if err != nil {
		return nil, err
	}
	err = yaml.Unmarshal(f, &config)
	if err != nil {
		return nil, err
	}
	if config.EndPoint == "" {
		config.EndPoint = defaultBaseURL
	}
	if config.TimeZone == "" {
		config.TimeZone = "UTC"
	}
	return config, nil
}
func LoadConfig ( configFile string ) ( * LastPassConfig , error ) { config := & LastPassConfig { } f , err := ioutil . ReadFile ( configFile ) if err != nil { return nil , err } err = yaml . Unmarshal ( f , & config ) if err != nil { return nil , err } if config . EndPoint == " " { config . EndPoint = defaultBaseURL } if config . TimeZone == " " { config . TimeZone = " " } return config , nil }
LoadConfig loads config file in YAML format.
LoadConfig loads config file in YAML format .