var defaults … var defaultsCacheMu … var defaultsCache … func init() { … } func fromEditionProto(epb descriptorpb.Edition) filedesc.Edition { … } func toEditionProto(ed filedesc.Edition) descriptorpb.Edition { … } func getFeatureSetFor(ed filedesc.Edition) *descriptorpb.FeatureSet { … } // mergeEditionFeatures merges the parent and child feature sets. This function // should be used when initializing Go descriptors from descriptor protos which // is why the parent is a filedesc.EditionsFeatures (Go representation) while // the child is a descriptorproto.FeatureSet (protoc representation). // Any feature set by the child overwrites what is set by the parent. func mergeEditionFeatures(parentDesc protoreflect.Descriptor, child *descriptorpb.FeatureSet) filedesc.EditionFeatures { … } // initFileDescFromFeatureSet initializes editions related fields in fd based // on fs. If fs is nil it is assumed to be an empty featureset and all fields // will be initialized with the appropriate default. fd.L1.Edition must be set // before calling this function. func initFileDescFromFeatureSet(fd *filedesc.File, fs *descriptorpb.FeatureSet) { … }