mirror of
https://github.com/dolthub/dolt.git
synced 2026-01-26 10:37:04 -06:00
The new serialization format use "t " as in typed. The rest of the message is a JSON array describing the typed data. The type is described by types.TypeRef Fixes #384 Issues #281, #304
22 lines
622 B
Cheetah
22 lines
622 B
Cheetah
// This file was generated by nomdl/codegen.
|
|
|
|
package {{.Name}}
|
|
|
|
{{if .HasTypes}}
|
|
var __{{.Name}}PackageInFile_{{.FileID}}_CachedRef = __{{.Name}}PackageInFile_{{.FileID}}_Ref()
|
|
|
|
// 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() ref.Ref {
|
|
p := types.PackageDef{
|
|
NamedTypes: types.MapOfStringToTypeRefDef{
|
|
{{range $name, $t := .NamedTypes}}
|
|
"{{$name}}": {{toTypesTypeRef $t "" ""}},{{end}}
|
|
},
|
|
}.New()
|
|
return types.RegisterPackage(&p)
|
|
}
|
|
{{end}}
|
|
|