github.com/authzed/spicedb@v1.32.1-0.20240520085336-ebda56537386/pkg/datastore/util.go (about) 1 package datastore 2 3 // DefinitionsOf returns just the schema definitions found in the list of revisioned 4 // definitions. 5 func DefinitionsOf[T SchemaDefinition](revisionedDefinitions []RevisionedDefinition[T]) []T { 6 definitions := make([]T, 0, len(revisionedDefinitions)) 7 for _, revDef := range revisionedDefinitions { 8 definitions = append(definitions, revDef.Definition) 9 } 10 return definitions 11 }