func ReadYAMLConfiguration(filepath string) *Configuration {
	p := path.Clean(filepath)
	if path.Ext(p) != ".yml" {
		log.Fatal("use YAML configuration file")
	}

	f, err := os.Open(path.Clean(filepath))
	if err != nil {
		log.Fatalf("err: %+v", err)
	}

	b, err := ioutil.ReadAll(f)
	if err != nil {
		log.Fatalf("err: %+v", err)
	}

	return parseYAMLConfiguration(b)
}
// ReadYAMLConfiguration - reads server configuration from yaml file
reads server configuration from yaml file
// ReadYAMLConfiguration - reads server configuration from yaml file
func ReadYAMLConfiguration(filepath string) *Configuration {
	p := path.Clean(filepath)
	if path.Ext(p) != ".yml" {
		log.Fatal("use YAML configuration file")
	}
	f, err := os.Open(path.Clean(filepath))
	if err != nil {
		log.Fatalf("err: %+v", err)
	}
	b, err := ioutil.ReadAll(f)
	if err != nil {
		log.Fatalf("err: %+v", err)
	}
	return parseYAMLConfiguration(b)
}
func ReadYAMLConfiguration ( filepath string ) * Configuration { p := path . Clean ( filepath ) if path . Ext ( p ) != " " { log . Fatal ( " " ) } f , err := os . Open ( path . Clean ( filepath ) ) if err != nil { log . Fatalf ( " " , err ) } b , err := ioutil . ReadAll ( f ) if err != nil { log . Fatalf ( " " , err ) } return parseYAMLConfiguration ( b ) }
reads server configuration from yaml file
reads server configuration from yaml file