mirror of
https://github.com/dolthub/dolt.git
synced 2026-04-26 11:39:05 -05:00
63c956a5c5
We want to explore encoding type information about Noms data in the Noms database. So, we need some way to describe types. This takes the shortest path to making a Noms type called "TypeRef" that is a peer of Set, Map et al and can describe all the types we currently use.
21 lines
573 B
Cheetah
21 lines
573 B
Cheetah
// This file was generated by nomdl/codegen.
|
|
|
|
package {{.Name}}
|
|
|
|
import "github.com/attic-labs/noms/types"
|
|
|
|
{{if .HasTypes}}
|
|
// This function builds up a Noms value that describes the type
|
|
// package implemented by this file and registers it with the global
|
|
// type package definition cache.
|
|
func __{{.Name}}PackageInFile_{{.FileID}}_Ref() types.Ref {
|
|
p := types.PackageDef{
|
|
Types: types.MapOfStringToTypeRefDef{
|
|
{{range $name, $t := .NamedTypes}}
|
|
"{{$name}}": __typeRefOf{{$name}}(),{{end}}
|
|
},
|
|
}.New()
|
|
return types.Ref{R: types.RegisterPackage(&p)}
|
|
}
|
|
{{end}}
|