func (c DatafileProjectConfig) GetFeatureByKey(featureKey string) (entities.Feature, error) {
	if feature, ok := c.featureMap[featureKey]; ok {
		return feature, nil
	}
	return entities.Feature{}, fmt.Errorf(`feature with key "%s" not found`, featureKey)
}
GetFeatureByKey returns the feature with the given key
package datafileprojectconfig
import (
	"errors"
	"fmt"
	"github.com/optimizely/go-sdk/pkg/config/datafileprojectconfig/mappers"
	"github.com/optimizely/go-sdk/pkg/entities"
	"github.com/optimizely/go-sdk/pkg/logging"
)
var datafileVersions = map[string]struct{}{
	"4": {},
}
type DatafileProjectConfig struct {
	datafile             string
	accountID            string
	projectID            string
	revision             string
	experimentKeyToIDMap map[string]string
	audienceMap          map[string]entities.Audience
	attributeMap         map[string]entities.Attribute
	eventMap             map[string]entities.Event
	attributeKeyToIDMap  map[string]string
	experimentMap        map[string]entities.Experiment
	featureMap           map[string]entities.Feature
	groupMap             map[string]entities.Group
	rollouts             []entities.Rollout
	rolloutMap           map[string]entities.Rollout
	anonymizeIP          bool
	botFiltering         bool
	sendFlagDecisions    bool
	sdkKey               string
	environmentKey       string
	flagVariationsMap map[string][]entities.Variation
}
func (c DatafileProjectConfig) GetDatafile() string {
	return c.datafile
}
func (c DatafileProjectConfig) GetProjectID() string {
	return c.projectID
}
func (c DatafileProjectConfig) GetRevision() string {
	return c.revision
}
func (c DatafileProjectConfig) GetAccountID() string {
	return c.accountID
}
func (c DatafileProjectConfig) GetAnonymizeIP() bool {
	return c.anonymizeIP
}
func (c DatafileProjectConfig) GetAttributes() (attributeList []entities.Attribute) {
	for _, attribute := range c.attributeMap {
		attributeList = append(attributeList, attribute)
	}
	return attributeList
}
func (c DatafileProjectConfig) GetAttributeID(key string) string {
	return c.attributeKeyToIDMap[key]
}
func (c DatafileProjectConfig) GetBotFiltering() bool {
	return c.botFiltering
}
func (c DatafileProjectConfig) GetSdkKey() string {
	return c.sdkKey
}
func (c DatafileProjectConfig) GetEnvironmentKey() string {
	return c.environmentKey
}
func (c DatafileProjectConfig) GetEvents() (eventList []entities.Event) {
	for _, event := range c.eventMap {
		eventList = append(eventList, event)
	}
	return eventList
}
func (c DatafileProjectConfig) GetEventByKey(eventKey string) (entities.Event, error) {
	if event, ok := c.eventMap[eventKey]; ok {
		return event, nil
	}
	return entities.Event{}, fmt.Errorf(`event with key "%s" not found`, eventKey)
}