func selectSchema(run *engexport.RunConfig) (r io.Reader, err error) {
	//The schema can be "engage", "goodbye" or a schema filename.
	//We retrieve a file from the statik object if the schema is
	//engage or goodbye.
	statikFS, err := fs.New()
	if err != nil {
		err = fmt.Errorf("Unable to open statik file system, error is %v", err)
		return r, err
	}
	switch run.Schema {
	case "just_custom_fields":
		r, err = statikFS.Open("/just_custom_fields.yaml")
	case "engage":
		r, err = statikFS.Open("/engage_schema.yaml")
	case "goodbye":
		r, err = statikFS.Open("/goodbye_schema.yaml")
	default:
		r, err = os.Open(run.Schema)
	}
	if err != nil {
		err = fmt.Errorf("Unable to find schema for '%v', %v", run.Schema, err)
	}
	return r, err
}
//schemaReader parses the "schema" argument in a RunConfig.  It returns a Reader
//to either built-in schemas or to an external schema file.
schemaReader parses the "schema" argument in a RunConfig.  It returns a Reader
to either built-in schemas or to an external schema file.
// schemaReader parses the " schema " argument in a RunConfig . It returns a Reader // to either built - in schemas or to an external schema file .
func selectSchema(run *engexport.RunConfig) (r io.Reader, err error) {
	statikFS, err := fs.New()
	if err != nil {
		err = fmt.Errorf("Unable to open statik file system, error is %v", err)
		return r, err
	}
	switch run.Schema {
	case "just_custom_fields":
		r, err = statikFS.Open("/just_custom_fields.yaml")
	case "engage":
		r, err = statikFS.Open("/engage_schema.yaml")
	case "goodbye":
		r, err = statikFS.Open("/goodbye_schema.yaml")
	default:
		r, err = os.Open(run.Schema)
	}
	if err != nil {
		err = fmt.Errorf("Unable to find schema for '%v', %v", run.Schema, err)
	}
	return r, err
}
func selectSchema ( run * engexport . RunConfig ) ( r io . Reader , err error ) { statikFS , err := fs . New ( ) if err != nil { err = fmt . Errorf ( " " , err ) return r , err } switch run . Schema { case " " : r , err = statikFS . Open ( " " ) case " " : r , err = statikFS . Open ( " " ) case " " : r , err = statikFS . Open ( " " ) default : r , err = os . Open ( run . Schema ) } if err != nil { err = fmt . Errorf ( " " , run . Schema , err ) } return r , err }
schemaReader parses the "schema" argument in a RunConfig.
schemaReader parses the " schema " argument in a RunConfig .
//The schema can be "engage", "goodbye" or a schema filename. //We retrieve a file from the statik object if the schema is //engage or goodbye.