Beispiel #1
0
func printValueMethod(ctx context.Context, env *envctx.Env, g *builder.Builder, typ *system.Type) error {
	name := system.GoName(typ.Id.Name)
	gotype, err := typ.NativeValueGolangType()
	if err != nil {
		return kerr.Wrap("LUHQRVBQRT", err)
	}
	g.Println("func (o *", name, ") Value() ", gotype, "{")
	{
		g.Println("return ", gotype, "(*o)")
	}
	g.Println("}")
	return nil
}