newFeatureSet creates a new featureSet for features of type T. The argument function should return the unique ID for a single feature.
(uniqueIDFunc func(T) string)
| 29 | // newFeatureSet creates a new featureSet for features of type T. |
| 30 | // The argument function should return the unique ID for a single feature. |
| 31 | func newFeatureSet[T any](uniqueIDFunc func(T) string) *featureSet[T] { |
| 32 | return &featureSet[T]{ |
| 33 | uniqueID: uniqueIDFunc, |
| 34 | features: make(map[string]T), |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | // add adds each feature to the set if it is not present, |
| 39 | // or replaces an existing feature. |
no outgoing calls
searching dependent graphs…