mirror of
https://github.com/dolthub/dolt.git
synced 2026-02-12 18:59:03 -06:00
The initial patch did this lazily, but that's kinda dumb. People won't compile in generated code they don't use.
23 lines
670 B
Cheetah
23 lines
670 B
Cheetah
// This file was generated by nomdl/codegen.
|
|
|
|
package {{.Name}}
|
|
|
|
import "github.com/attic-labs/noms/types"
|
|
|
|
{{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() 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}}
|