Files
moxa/stdlib/context.go
Marc Vertes 25adc35a3c Change representation of stdlib from interface{} to reflect.Value
This fixes problems due to storing binary symbols as interfaces{}
instead of concrete type, which confuses lookup functions to retrieve
methods etc. in reflect.
2018-08-28 03:12:28 +02:00

26 lines
816 B
Go

package stdlib
// Generated by 'goexports context'. Do not edit!
import (
"context"
"reflect"
)
func init() {
Value["context"] = map[string]reflect.Value{
"Background": reflect.ValueOf(context.Background),
"Canceled": reflect.ValueOf(context.Canceled),
"DeadlineExceeded": reflect.ValueOf(context.DeadlineExceeded),
"TODO": reflect.ValueOf(context.TODO),
"WithCancel": reflect.ValueOf(context.WithCancel),
"WithDeadline": reflect.ValueOf(context.WithDeadline),
"WithTimeout": reflect.ValueOf(context.WithTimeout),
"WithValue": reflect.ValueOf(context.WithValue),
}
Type["context"] = map[string]reflect.Type{
"CancelFunc": reflect.TypeOf((*context.CancelFunc)(nil)).Elem(),
"Context": reflect.TypeOf((*context.Context)(nil)).Elem(),
}
}