// GetFieldNameForDirName returns the metadata field name for a given directory name
GetFieldNameForDirName returns the metadata field name for a given directory name
// GetFieldNameForDirName returns the metadata field name for a given directory name
func GetFieldNameForDirName(dirName string) string {
	metadataType := reflect.TypeOf(Metadata{})
	fieldCount := metadataType.NumField()
	for i := 0; i < fieldCount; i++ {
		field := metadataType.Field(i)
		jsonTag := field.Tag.Get("json")
		if jsonTag == dirName {
			return field.Name
		}
	}
	return ""
}
func GetFieldNameForDirName ( dirName string ) string { metadataType := reflect . TypeOf ( Metadata { } ) fieldCount := metadataType . NumField ( ) for i := 0 ; i < fieldCount ; i ++ { field := metadataType . Field ( i ) jsonTag := field . Tag . Get ( " " ) if jsonTag == dirName { return field . Name } } return " " }
GetFieldNameForDirName returns the metadata field name for a given directory name
GetFieldNameForDirName returns the metadata field name for a given directory name