blob: 3e31508d94e863e709f466cb3b3dba3ca934bb35 [file] [log] [blame]
// Code generated by gocode.Generate; DO NOT EDIT.
package pkg2
import (
"fmt"
"cuelang.org/go/cue"
"cuelang.org/go/encoding/gocode/gocodec"
_ "cuelang.org/go/pkg"
)
var cuegenvalImportMe = cuegenMake("ImportMe", &ImportMe{})
// Validate validates x.
func (x *ImportMe) Validate() error {
return cuegenCodec.Validate(cuegenvalImportMe, x)
}
var cuegenvalPickMe = cuegenMake("PickMe", nil)
// Validate validates x.
func (x PickMe) Validate() error {
return cuegenCodec.Validate(cuegenvalPickMe, x)
}
var cuegenCodec, cuegenInstance = func() (*gocodec.Codec, *cue.Instance) {
var r *cue.Runtime
r = &cue.Runtime{}
instances, err := r.Unmarshal(cuegenInstanceData)
if err != nil {
panic(err)
}
if len(instances) != 1 {
panic("expected encoding of exactly one instance")
}
return gocodec.New(r, nil), instances[0]
}()
// cuegenMake is called in the init phase to initialize CUE values for
// validation functions.
func cuegenMake(name string, x interface{}) cue.Value {
f, err := cuegenInstance.Value().FieldByName(name, true)
if err != nil {
panic(fmt.Errorf("could not find type %q in instance", name))
}
v := f.Value
if x != nil {
w, err := cuegenCodec.ExtractType(x)
if err != nil {
panic(err)
}
v = v.Unify(w)
}
return v
}
// Data size: 276 bytes.
var cuegenInstanceData = []byte("\x01\x1f\x8b\b\x00\x00\x00\x00\x00\x00\xffD\x8e\xc1J\x031\x10\x86\xe7\u07ee`C\x15|\x00a\xd9S\x05\u066d\x82\bE\x84\xaa\b\x1e\x94\xe2U<\x8ci\x8c\xa1mR\x9a\xecA\u0103Z\xabO\xe3+FR*\x9ef\xf8f\xfe\x9fo+~e\xc8\xe27!\xbe\x13\x1d\u01f7\x16\xd01\xd6\a\xb6R]p\xe0\xc4\xd1B~\xeb\\@F\u0207\x1c\x9e\xd0!l\\\x9a\x89\xf2\x88K\"\u068d\x9f\x19\xb0}w/\x1bU=\x9a\xc9:\xb9$\xc4\x05Q7~\xb4\x80\xcd\u007f\xbe d\xc8ox\xaaRQ\xbe\x82\x82\x88\xe2O\x12\x01\xb0/\x1b5a\xab+7\u05f5v\xb5\xb2\u048d\x8cM\xbbt#U\a\xe5\u00c8\x03\u05f3\xb1>\x04\xb0\x93f\xfd\xa7]\xc9F\x81g,\u01ecU\x91NB\x98\xe9\xcc\xcdCQ\xfa07V\xfbR\x88\xab\x15\xb9V\xfd\xe2E\xb4\a\xfd\xe2\xe4\xa0\xd7\x13\xed\xb3~\xb1~\xa9\u039d\rl\xac\x1f\xd8\xe7n\xc9\x0f\xb2\xdc\x13\xafbh\xe48eN\x8f\x04\xd1o\x00\x00\x00\xff\xff\ue135\t=\x01\x00\x00")