Compare commits

...

4 Commits

Author SHA1 Message Date
Marc Vertes
9977ef6fc6 Revert "fix: make interpreter methods discoverable by runtime (#722)" (#732)
This reverts commit a3b2737b5c.
2020-07-01 16:16:26 +02:00
Marc Vertes
39430c34bb fix: untyped constant converson to default type (#729)
* fix: untyped constant cconverson to default type

In definition assign expression, the source type is propagated to
the assigned value. If the source is an untyped constant, the
destination type must be set to the default type of the constant
definition. A fixType function is provided to perform this.

In addition, the type conversion and check of constants is
refactored for simplifications.

Fixes #727.

* test: fix _test/const14.go
2020-07-01 14:39:47 +02:00
mpl
4f3481b55c interp: support another vendoring case 2020-07-01 10:44:03 +02:00
Marc Vertes
55f2fe396a fix: goexports skisp unimplemented solaris Syscall6 (#726)
The standard library syscall package for Solaris defines unimplemented
symbols Syscall6 and RawSyscall6 which makes the build fails on
Solaris platform, now that yaegi command imports syscall symbols.

As the standard library package is locked down, this will remain
unchanged. We just skip those symbols.

Fixes #725.
2020-06-30 22:50:44 +02:00
191 changed files with 290 additions and 2256 deletions

13
_test/const14.go Normal file
View File

@@ -0,0 +1,13 @@
package main
import "compress/flate"
func f1(i int) { println("i:", i) }
func main() {
i := flate.BestSpeed
f1(i)
}
// Output:
// i: 1

View File

@@ -1,25 +0,0 @@
package main
import (
"fmt"
"strconv"
)
type Foo int
func (f Foo) String() string {
return "foo-" + strconv.Itoa(int(f))
}
func print1(arg interface{}) {
fmt.Println(arg)
}
func main() {
var arg Foo = 3
var f = print1
f(arg)
}
// Output:
// foo-3

View File

@@ -1,20 +0,0 @@
package main
import (
"fmt"
"strconv"
)
type Int int
func (I Int) String() string {
return "foo-" + strconv.Itoa(int(I))
}
func main() {
var i Int = 3
fmt.Println(i)
}
// Output:
// foo-3

View File

@@ -88,14 +88,10 @@ func init() {
{{range $key, $value := .Wrap -}}
// {{$value.Name}} is an interface wrapper for {{$key}} type
type {{$value.Name}} struct {
Val interface{}
{{range $m := $value.Method -}}
W{{$m.Name}} func{{$m.Param}} {{$m.Result}}
{{end}}
}
{{- if $value.NeedString}}
func (W {{$value.Name}}) String() string { return fmt.Sprint(W.Val) }
{{end}}
{{range $m := $value.Method -}}
func (W {{$value.Name}}) {{$m.Name}}{{$m.Param}} {{$m.Result}} { {{$m.Ret}} W.W{{$m.Name}}{{$m.Arg}} }
{{end}}
@@ -115,12 +111,11 @@ type Method struct {
// Wrap store information for generating interface wrapper.
type Wrap struct {
Name string
NeedString bool
Method []Method
Name string
Method []Method
}
func genContent(dest, pkgName, license string) ([]byte, error) {
func genContent(dest, pkgName, license string, skip map[string]bool) ([]byte, error) {
p, err := importer.ForCompiler(token.NewFileSet(), "source", nil).Import(pkgName)
if err != nil {
return nil, err
@@ -152,6 +147,10 @@ func genContent(dest, pkgName, license string) ([]byte, error) {
}
pname := path.Base(pkgName) + "." + name
if skip[pname] {
continue
}
switch o := o.(type) {
case *types.Const:
if b, ok := o.Type().(*types.Basic); ok && (b.Info()&types.IsUntyped) != 0 {
@@ -168,7 +167,6 @@ func genContent(dest, pkgName, license string) ([]byte, error) {
typ[name] = pname
if t, ok := o.Type().Underlying().(*types.Interface); ok {
var methods []Method
needString := true
for i := 0; i < t.NumMethods(); i++ {
f := t.Method(i)
if !f.Exported() {
@@ -199,15 +197,10 @@ func genContent(dest, pkgName, license string) ([]byte, error) {
if sign.Results().Len() > 0 {
ret = "return"
}
if f.Name() == "String" {
needString = false
}
methods = append(methods, Method{f.Name(), param, result, arg, ret})
}
if needString {
imports["fmt"] = true
}
wrap[name] = Wrap{prefix + name, needString, methods}
wrap[name] = Wrap{prefix + name, methods}
}
}
}
@@ -347,20 +340,25 @@ func main() {
dest := path.Base(dir)
for _, pkg := range flag.Args() {
content, err := genContent(dest, pkg, license)
if err != nil {
log.Println(err)
continue
}
var oFile string
skip := map[string]bool{}
if pkg == "syscall" {
goos, arch := os.Getenv("GOOS"), os.Getenv("GOARCH")
oFile = strings.Replace(pkg, "/", "_", -1) + "_" + goos + "_" + arch + ".go"
if goos == "solaris" {
skip["syscall.RawSyscall6"] = true
skip["syscall.Syscall6"] = true
}
} else {
oFile = strings.Replace(pkg, "/", "_", -1) + ".go"
}
content, err := genContent(dest, pkg, license, skip)
if err != nil {
log.Println(err)
continue
}
prefix := runtime.Version()
if runtime.Version() != "devel" {
parts := strings.Split(runtime.Version(), ".")

View File

@@ -0,0 +1,17 @@
package pkg
import (
"fmt"
"guthib.com/containous/fromage"
)
func Here() string {
return "root"
}
func NewSample() func() string {
return func() string {
return fmt.Sprintf("%s %s", Here(), fromage.Hello())
}
}

View File

@@ -0,0 +1,7 @@
package fromage
import "fmt"
func Hello() string {
return fmt.Sprint("Fromage")
}

View File

@@ -0,0 +1,11 @@
package main
import (
"fmt"
"guthib.com/containous/fromage"
)
func main() {
fmt.Print(fromage.Hello())
}

View File

@@ -0,0 +1,7 @@
package fromage
import "fmt"
func Hello() string {
return fmt.Sprint("Fromage")
}

View File

@@ -1,6 +1,11 @@
package pkg
import (
"bytes"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"testing"
@@ -10,9 +15,11 @@ import (
func TestPackages(t *testing.T) {
testCases := []struct {
desc string
goPath string
expected string
desc string
goPath string
expected string
topImport string
evalFile string
}{
{
desc: "vendor",
@@ -64,6 +71,18 @@ func TestPackages(t *testing.T) {
goPath: "./_pkg8/",
expected: "root Fromage!",
},
{
desc: "at the project root",
goPath: "./_pkg10/",
expected: "root Fromage",
topImport: "github.com/foo",
},
{
desc: "eval main that has vendored dep",
goPath: "./_pkg11/",
expected: "Fromage",
evalFile: "./_pkg11/src/foo/foo.go",
},
}
for _, test := range testCases {
@@ -78,20 +97,61 @@ func TestPackages(t *testing.T) {
i := interp.New(interp.Options{GoPath: goPath})
i.Use(stdlib.Symbols) // Use binary standard library
// Load pkg from sources
if _, err = i.Eval(`import "github.com/foo/pkg"`); err != nil {
t.Fatal(err)
var msg string
if test.evalFile != "" {
// setting i.Name as this is how it's actually done in cmd/yaegi
i.Name = test.evalFile
data, err := ioutil.ReadFile(test.evalFile)
if err != nil {
t.Fatal(err)
}
// TODO(mpl): this is brittle if we do concurrent tests and stuff, do better later.
stdout := os.Stdout
defer func() { os.Stdout = stdout }()
pr, pw, err := os.Pipe()
if err != nil {
t.Fatal(err)
}
os.Stdout = pw
if _, err := i.Eval(string(data)); err != nil {
t.Fatal(err)
}
var buf bytes.Buffer
errC := make(chan error)
go func() {
_, err := io.Copy(&buf, pr)
errC <- err
}()
if err := pw.Close(); err != nil {
t.Fatal(err)
}
if err := <-errC; err != nil {
t.Fatal(err)
}
msg = buf.String()
} else {
// Load pkg from sources
topImport := "github.com/foo/pkg"
if test.topImport != "" {
topImport = test.topImport
}
if _, err = i.Eval(fmt.Sprintf(`import "%s"`, topImport)); err != nil {
t.Fatal(err)
}
value, err := i.Eval(`pkg.NewSample()`)
if err != nil {
t.Fatal(err)
}
fn := value.Interface().(func() string)
msg = fn()
}
value, err := i.Eval(`pkg.NewSample()`)
if err != nil {
t.Fatal(err)
}
fn := value.Interface().(func() string)
msg := fn()
if msg != test.expected {
t.Errorf("Got %q, want %q", msg, test.expected)
}

View File

@@ -470,7 +470,10 @@ func (interp *Interpreter) cfg(root *node, pkgID string) ([]*node, error) {
if src.typ.isBinMethod {
dest.typ = &itype{cat: valueT, rtype: src.typ.methodCallType()}
} else {
dest.typ = src.typ
// In a new definition, propagate the source type to the destination
// type. If the source is an untyped constant, make sure that the
// type matches a default type.
dest.typ = sc.fixType(src.typ)
}
}
if dest.typ.sizedef {

View File

@@ -14,7 +14,6 @@ import (
"runtime"
"runtime/debug"
"strconv"
"strings"
"sync"
"sync/atomic"
)
@@ -103,9 +102,6 @@ type Exports map[string]map[string]reflect.Value
// imports stores the map of source packages per package path.
type imports map[string]map[string]*symbol
// binWrap stores the map of binary interface wrappers indexed per method signature.
type binWrap map[string][]reflect.Type
// opt stores interpreter options.
type opt struct {
astDot bool // display AST graph (debug)
@@ -135,15 +131,13 @@ type Interpreter struct {
binPkg Exports // binary packages used in interpreter, indexed by path
rdir map[string]bool // for src import cycle detection
mutex sync.RWMutex
done chan struct{} // for cancellation of channel operations
mutex sync.RWMutex
frame *frame // program data storage during execution
universe *scope // interpreter global level scope
scopes map[string]*scope // package level scopes, indexed by package name
srcPkg imports // source packages used in interpreter, indexed by path
pkgNames map[string]string // package names, indexed by path
binWrap binWrap // binary wrappers indexed by method signature
done chan struct{} // for cancellation of channel operations
hooks *hooks // symbol hooks
}
@@ -167,16 +161,10 @@ func init() { Symbols[selfPath]["Symbols"] = reflect.ValueOf(Symbols) }
// _error is a wrapper of error interface type.
type _error struct {
Val interface{}
WError func() string
}
func (w _error) Error() string {
if w.WError != nil {
return w.WError()
}
return fmt.Sprint(w.Val)
}
func (w _error) Error() string { return w.WError() }
// Panic is an error recovered from a panic call in interpreted code.
type Panic struct {
@@ -230,7 +218,6 @@ func New(options Options) *Interpreter {
srcPkg: imports{},
pkgNames: map[string]string{},
rdir: map[string]bool{},
binWrap: binWrap{},
hooks: &hooks{},
}
@@ -470,23 +457,6 @@ func (interp *Interpreter) stop() {
func (interp *Interpreter) runid() uint64 { return atomic.LoadUint64(&interp.id) }
// getWrapperType returns the wrapper type which implements the highest number of methods of t.
func (interp *Interpreter) getWrapperType(t *itype) reflect.Type {
methods := t.methods()
var nmw int
var wt reflect.Type
// build a list of wrapper type candidates
for k, v := range methods {
for _, it := range interp.binWrap[k+v] {
if methods.containsR(it) && it.NumMethod() > nmw {
nmw = it.NumMethod()
wt = it
}
}
}
return wt
}
// getWrapper returns the wrapper type of the corresponding interface, or nil if not found.
func (interp *Interpreter) getWrapper(t reflect.Type) reflect.Type {
if p, ok := interp.binPkg[t.PkgPath()]; ok {
@@ -505,21 +475,6 @@ func (interp *Interpreter) Use(values Exports) {
}
interp.binPkg[k] = v
// Register binary interface wrappers.
for id, val := range v {
if !strings.HasPrefix(id, "_") {
continue
}
t := val.Type().Elem()
it := v[strings.TrimPrefix(id, "_")].Type().Elem()
nm := it.NumMethod()
for i := 0; i < nm; i++ {
m := it.Method(i)
name := m.Name + m.Type.String()
interp.binWrap[name] = append(interp.binWrap[name], t)
}
}
}
}

View File

@@ -377,7 +377,7 @@ func assign(n *node) {
case dest.typ.cat == interfaceT:
svalue[i] = genValueInterface(src)
case (dest.typ.cat == valueT || dest.typ.cat == errorT) && dest.typ.rtype.Kind() == reflect.Interface:
svalue[i], _ = genInterfaceWrapper(src, nil)
svalue[i] = genInterfaceWrapper(src, dest.typ.rtype)
case src.typ.cat == funcT && dest.typ.cat == valueT:
svalue[i] = genFunctionWrapper(src)
case src.typ.cat == funcT && isField(dest):
@@ -661,11 +661,7 @@ func genFunctionWrapper(n *node) func(*frame) reflect.Value {
if rcvr != nil {
src, dest := rcvr(f), d[numRet]
if src.Type().Kind() != dest.Type().Kind() {
if vi, ok := src.Interface().(valueInterface); ok {
dest.Set(vi.value)
} else {
dest.Set(src.Addr())
}
dest.Set(src.Addr())
} else {
dest.Set(src)
}
@@ -702,24 +698,13 @@ func genFunctionWrapper(n *node) func(*frame) reflect.Value {
}
}
func genInterfaceWrapper(n *node, t reflect.Type) (func(*frame) reflect.Value, bool) {
func genInterfaceWrapper(n *node, typ reflect.Type) func(*frame) reflect.Value {
value := genValue(n)
var typ reflect.Type
switch n.typ.cat {
case valueT:
return value, false
default:
if t != nil {
if nt := n.typ.TypeOf(); nt != nil && nt.Kind() == reflect.Interface {
return value, false
}
typ = n.interp.getWrapper(t)
} else {
typ = n.interp.getWrapperType(n.typ)
}
if typ == nil || typ.Kind() != reflect.Interface || typ.NumMethod() == 0 || n.typ.cat == valueT {
return value
}
if typ == nil {
return value, false
if nt := n.typ.TypeOf(); nt != nil && nt.Kind() == reflect.Interface {
return value
}
mn := typ.NumMethod()
names := make([]string, mn)
@@ -733,6 +718,7 @@ func genInterfaceWrapper(n *node, t reflect.Type) (func(*frame) reflect.Value, b
_, indexes[i], _, _ = n.typ.lookupBinMethod(names[i])
}
}
wrap := n.interp.getWrapper(typ)
return func(f *frame) reflect.Value {
v := value(f)
@@ -740,29 +726,22 @@ func genInterfaceWrapper(n *node, t reflect.Type) (func(*frame) reflect.Value, b
switch v.Kind() {
case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice:
if v.IsNil() {
return reflect.New(v.Type()).Elem()
return reflect.New(typ).Elem()
}
if v.Kind() == reflect.Ptr {
vv = v.Elem()
}
}
if v.Kind() == reflect.Ptr {
vv = v.Elem()
}
if vi, ok := v.Interface().(valueInterface); ok {
v = vi.value
}
w := reflect.New(typ).Elem()
w.Field(0).Set(v)
w := reflect.New(wrap).Elem()
for i, m := range methods {
if m == nil {
if names[i] == "String" {
continue
}
if r := v.MethodByName(names[i]); r.IsValid() {
w.FieldByName("W" + names[i]).Set(r)
w.Field(i).Set(r)
continue
}
o := vv.FieldByIndex(indexes[i])
if r := o.MethodByName(names[i]); r.IsValid() {
w.FieldByName("W" + names[i]).Set(r)
w.Field(i).Set(r)
} else {
log.Println(n.cfgErrorf("genInterfaceWrapper error, no method %s", names[i]))
}
@@ -770,10 +749,10 @@ func genInterfaceWrapper(n *node, t reflect.Type) (func(*frame) reflect.Value, b
}
nod := *m
nod.recv = &receiver{n, v, indexes[i]}
w.FieldByName("W" + names[i]).Set(genFunctionWrapper(&nod)(f))
w.Field(i).Set(genFunctionWrapper(&nod)(f))
}
return w
}, true
}
}
func call(n *node) {
@@ -1019,6 +998,14 @@ func call(n *node) {
}
}
// pindex returns definition parameter index for function call.
func pindex(i, variadic int) int {
if variadic < 0 || i <= variadic {
return i
}
return variadic
}
// Callbin calls a function from a bin import, accessible through reflect.
func callBin(n *node) {
tnext := getExec(n.tnext)
@@ -1046,6 +1033,7 @@ func callBin(n *node) {
}
for i, c := range child {
defType := funcType.In(pindex(i, variadic))
switch {
case isBinCall(c):
// Handle nested function calls: pass returned values as arguments
@@ -1084,12 +1072,10 @@ func callBin(n *node) {
case interfaceT:
values = append(values, genValueInterfaceArray(c))
default:
v, _ := genInterfaceWrapper(c, nil)
values = append(values, v)
values = append(values, genInterfaceWrapper(c, defType))
}
default:
v, _ := genInterfaceWrapper(c, nil)
values = append(values, v)
values = append(values, genInterfaceWrapper(c, defType))
}
}
}
@@ -1768,7 +1754,7 @@ func _return(n *node) {
for i, c := range child {
switch t := def.typ.ret[i]; t.cat {
case errorT:
values[i], _ = genInterfaceWrapper(c, t.TypeOf())
values[i] = genInterfaceWrapper(c, t.TypeOf())
case aliasT:
if isInterfaceSrc(t) {
values[i] = genValueInterface(c)
@@ -1781,7 +1767,7 @@ func _return(n *node) {
values[i] = genValueInterface(c)
case valueT:
if t.rtype.Kind() == reflect.Interface {
values[i], _ = genInterfaceWrapper(c, nil)
values[i] = genInterfaceWrapper(c, t.rtype)
break
}
fallthrough
@@ -2703,11 +2689,7 @@ func convertLiteralValue(n *node, t reflect.Type) {
// Skip non-constant values, undefined target type or interface target type.
case n.rval.IsValid():
// Convert constant value to target type.
if n.typ != nil && n.typ.cat != valueT {
convertConstantValue(n)
} else {
convertConstantValueTo(n, t)
}
convertConstantValue(n)
n.rval = n.rval.Convert(t)
default:
// Create a zero value of target type.
@@ -2715,6 +2697,20 @@ func convertLiteralValue(n *node, t reflect.Type) {
}
}
var bitlen = [...]int{
reflect.Int: 64,
reflect.Int8: 8,
reflect.Int16: 16,
reflect.Int32: 32,
reflect.Int64: 64,
reflect.Uint: 64,
reflect.Uint8: 8,
reflect.Uint16: 16,
reflect.Uint32: 32,
reflect.Uint64: 64,
reflect.Uintptr: 64,
}
func convertConstantValue(n *node) {
if !n.rval.IsValid() {
return
@@ -2723,187 +2719,64 @@ func convertConstantValue(n *node) {
if !ok {
return
}
t := n.typ
for t != nil && t.cat == aliasT {
// If it is an alias, get the actual type
t = t.val
}
v := n.rval
switch t.cat {
case intT, int8T, int16T, int32T, int64T:
i, _ := constant.Int64Val(c)
l := constant.BitLen(c)
switch t.cat {
case intT:
if l > 64 {
panic(fmt.Sprintf("constant %s overflows int", c.ExactString()))
}
v = reflect.ValueOf(int(i))
case int8T:
if l > 8 {
panic(fmt.Sprintf("constant %s overflows int8", c.ExactString()))
}
v = reflect.ValueOf(int8(i))
case int16T:
if l > 16 {
panic(fmt.Sprintf("constant %s overflows int16", c.ExactString()))
}
v = reflect.ValueOf(int16(i))
case int32T:
if l > 32 {
panic(fmt.Sprintf("constant %s overflows int32", c.ExactString()))
}
v = reflect.ValueOf(int32(i))
case int64T:
if l > 64 {
panic(fmt.Sprintf("constant %s overflows int64", c.ExactString()))
}
v = reflect.ValueOf(i)
}
case uintT, uint8T, uint16T, uint32T, uint64T:
i, _ := constant.Uint64Val(c)
l := constant.BitLen(c)
switch t.cat {
case uintT:
if l > 64 {
panic(fmt.Sprintf("constant %s overflows uint", c.ExactString()))
}
v = reflect.ValueOf(uint(i))
case uint8T:
if l > 8 {
panic(fmt.Sprintf("constant %s overflows uint8", c.ExactString()))
}
v = reflect.ValueOf(uint8(i))
case uint16T:
if l > 16 {
panic(fmt.Sprintf("constant %s overflows uint16", c.ExactString()))
}
v = reflect.ValueOf(uint16(i))
case uint32T:
if l > 32 {
panic(fmt.Sprintf("constant %s overflows uint32", c.ExactString()))
}
v = reflect.ValueOf(uint32(i))
case uint64T:
if l > 64 {
panic(fmt.Sprintf("constant %s overflows uint64", c.ExactString()))
}
v = reflect.ValueOf(i)
case uintptrT:
if l > 64 {
panic(fmt.Sprintf("constant %s overflows uintptr", c.ExactString()))
}
v = reflect.ValueOf(i)
}
case float32T:
f, _ := constant.Float32Val(c)
v = reflect.ValueOf(f)
case float64T:
f, _ := constant.Float64Val(c)
v = reflect.ValueOf(f)
case complex64T:
r, _ := constant.Float32Val(constant.Real(c))
i, _ := constant.Float32Val(constant.Imag(c))
v = reflect.ValueOf(complex(r, i))
case complex128T:
r, _ := constant.Float64Val(constant.Real(c))
i, _ := constant.Float64Val(constant.Imag(c))
v = reflect.ValueOf(complex(r, i))
}
n.rval = v
}
func convertConstantValueTo(n *node, typ reflect.Type) {
if !n.rval.IsValid() {
return
}
c, ok := n.rval.Interface().(constant.Value)
if !ok {
return
}
v := n.rval
switch typ.Kind() {
typ := n.typ.TypeOf()
kind := typ.Kind()
switch kind {
case reflect.Bool:
v = reflect.ValueOf(constant.BoolVal(c)).Convert(typ)
case reflect.String:
v = reflect.ValueOf(constant.StringVal(c)).Convert(typ)
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
i, _ := constant.Int64Val(c)
l := constant.BitLen(c)
switch typ.Kind() {
case reflect.Int:
if l > 64 {
panic(fmt.Sprintf("constant %s overflows int", c.ExactString()))
}
v = reflect.ValueOf(int(i))
case reflect.Int8:
if l > 8 {
panic(fmt.Sprintf("constant %s overflows int8", c.ExactString()))
}
v = reflect.ValueOf(int8(i))
case reflect.Int16:
if l > 16 {
panic(fmt.Sprintf("constant %s overflows int16", c.ExactString()))
}
v = reflect.ValueOf(int16(i))
case reflect.Int32:
if l > 32 {
panic(fmt.Sprintf("constant %s overflows int32", c.ExactString()))
}
v = reflect.ValueOf(int32(i))
case reflect.Int64:
if l > 64 {
panic(fmt.Sprintf("constant %s overflows int64", c.ExactString()))
}
v = reflect.ValueOf(i)
if l > bitlen[kind] {
panic(fmt.Sprintf("constant %s overflows int%d", c.ExactString(), bitlen[kind]))
}
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
v = reflect.ValueOf(i).Convert(typ)
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
i, _ := constant.Uint64Val(c)
l := constant.BitLen(c)
switch typ.Kind() {
case reflect.Uint:
if l > 64 {
panic(fmt.Sprintf("constant %s overflows uint", c.ExactString()))
}
v = reflect.ValueOf(uint(i))
case reflect.Uint8:
if l > 8 {
panic(fmt.Sprintf("constant %s overflows uint8", c.ExactString()))
}
v = reflect.ValueOf(uint8(i))
case reflect.Uint16:
if l > 16 {
panic(fmt.Sprintf("constant %s overflows uint16", c.ExactString()))
}
v = reflect.ValueOf(uint16(i))
case reflect.Uint32:
if l > 32 {
panic(fmt.Sprintf("constant %s overflows uint32", c.ExactString()))
}
v = reflect.ValueOf(uint32(i))
case reflect.Uint64:
if l > 64 {
panic(fmt.Sprintf("constant %s overflows uint64", c.ExactString()))
}
v = reflect.ValueOf(i)
case reflect.Uintptr:
if l > 64 {
panic(fmt.Sprintf("constant %s overflows uintptr", c.ExactString()))
}
v = reflect.ValueOf(i)
if l > bitlen[kind] {
panic(fmt.Sprintf("constant %s overflows uint%d", c.ExactString(), bitlen[kind]))
}
v = reflect.ValueOf(i).Convert(typ)
case reflect.Float32:
f, _ := constant.Float32Val(c)
v = reflect.ValueOf(f)
v = reflect.ValueOf(f).Convert(typ)
case reflect.Float64:
f, _ := constant.Float64Val(c)
v = reflect.ValueOf(f)
v = reflect.ValueOf(f).Convert(typ)
case reflect.Complex64:
r, _ := constant.Float32Val(constant.Real(c))
i, _ := constant.Float32Val(constant.Imag(c))
v = reflect.ValueOf(complex(r, i))
v = reflect.ValueOf(complex(r, i)).Convert(typ)
case reflect.Complex128:
r, _ := constant.Float64Val(constant.Real(c))
i, _ := constant.Float64Val(constant.Imag(c))
v = reflect.ValueOf(complex(r, i))
v = reflect.ValueOf(complex(r, i)).Convert(typ)
default:
// Type kind is from internal constant representation. Only use default types here.
switch c.Kind() {
case constant.Bool:
v = reflect.ValueOf(constant.BoolVal(c))
case constant.String:
v = reflect.ValueOf(constant.StringVal(c))
case constant.Int:
i, x := constant.Int64Val(c)
if !x {
panic(fmt.Sprintf("constant %s overflows int64", c.ExactString()))
}
v = reflect.ValueOf(int(i))
case constant.Float:
f, _ := constant.Float64Val(c)
v = reflect.ValueOf(f)
case constant.Complex:
r, _ := constant.Float64Val(constant.Real(c))
i, _ := constant.Float64Val(constant.Imag(c))
v = reflect.ValueOf(complex(r, i))
}
}
n.rval = v
}

View File

@@ -153,6 +153,24 @@ func (s *scope) rangeChanType(n *node) *itype {
return nil
}
// fixType returns the input type, or a valid default type for untyped constant.
func (s *scope) fixType(t *itype) *itype {
if !t.untyped || t.cat != valueT {
return t
}
switch typ := t.TypeOf(); typ.Kind() {
case reflect.Int64:
return s.getType("int")
case reflect.Uint64:
return s.getType("uint")
case reflect.Float64:
return s.getType("float64")
case reflect.Complex128:
return s.getType("complex128")
}
return t
}
func (s *scope) getType(ident string) *itype {
var t *itype
if sym, _, found := s.lookup(ident); found {

View File

@@ -26,8 +26,14 @@ func (interp *Interpreter) importSrc(rPath, path string) (string, error) {
rPath = "."
}
dir = filepath.Join(filepath.Dir(interp.Name), rPath, path)
} else if dir, rPath, err = pkgDir(interp.context.GOPATH, rPath, path); err != nil {
return "", err
} else {
root, err := interp.rootFromSourceLocation(rPath)
if err != nil {
return "", err
}
if dir, rPath, err = pkgDir(interp.context.GOPATH, root, path); err != nil {
return "", err
}
}
if interp.rdir[path] {
@@ -138,6 +144,23 @@ func (interp *Interpreter) importSrc(rPath, path string) (string, error) {
return pkgName, nil
}
func (interp *Interpreter) rootFromSourceLocation(rPath string) (string, error) {
sourceFile := interp.Name
if rPath != "main" || !strings.HasSuffix(sourceFile, ".go") {
return rPath, nil
}
wd, err := os.Getwd()
if err != nil {
return "", err
}
pkgDir := filepath.Join(wd, filepath.Dir(sourceFile))
root := strings.TrimPrefix(pkgDir, filepath.Join(interp.context.GOPATH, "src")+"/")
if root == wd {
return "", fmt.Errorf("package location %s not in GOPATH", pkgDir)
}
return root, nil
}
// pkgDir returns the absolute path in filesystem for a package given its name and
// the root of the subtree dependencies.
func pkgDir(goPath string, root, path string) (string, string, error) {

View File

@@ -960,22 +960,6 @@ func (m methodSet) contains(n methodSet) bool {
return true
}
// containsR returns true if all methods of t are defined in m method set.
func (m methodSet) containsR(t reflect.Type) bool {
nm := t.NumMethod()
for i := 0; i < nm; i++ {
method := t.Method(i)
if method.Name == "String" || method.Name == "Error" { // always provided by wrapper
continue
}
// TODO: should also verify method signature
if m[method.Name] == "" {
return false
}
}
return true
}
// Equal returns true if the method set m is equal to the method set n.
func (m methodSet) equals(n methodSet) bool {
return m.contains(n) && n.contains(m)
@@ -983,17 +967,7 @@ func (m methodSet) equals(n methodSet) bool {
// Methods returns a map of method type strings, indexed by method names.
func (t *itype) methods() methodSet {
return getMethods(t, map[string]bool{})
}
func getMethods(t *itype, visited map[string]bool) methodSet {
res := make(methodSet)
name := t.path + "/" + t.name
if visited[name] {
return res
}
visited[name] = true
switch t.cat {
case interfaceT:
// Get methods from recursive analysis of interface fields.
@@ -1001,7 +975,7 @@ func getMethods(t *itype, visited map[string]bool) methodSet {
if f.typ.cat == funcT {
res[f.name] = f.typ.TypeOf().String()
} else {
for k, v := range getMethods(f.typ, visited) {
for k, v := range f.typ.methods() {
res[k] = v
}
}
@@ -1013,12 +987,12 @@ func getMethods(t *itype, visited map[string]bool) methodSet {
res[m.Name] = m.Type.String()
}
case ptrT:
for k, v := range getMethods(t.val, visited) {
for k, v := range t.val.methods() {
res[k] = v
}
case structT:
for _, f := range t.field {
for k, v := range getMethods(f.typ, visited) {
for k, v := range f.typ.methods() {
res[k] = v
}
}

View File

@@ -252,10 +252,10 @@ func genValueInterfaceValue(n *node) func(*frame) reflect.Value {
return func(f *frame) reflect.Value {
v := value(f)
if nod := v.Interface().(valueInterface).node; nod == nil {
if v.Interface().(valueInterface).node == nil {
// Uninitialized interface value, set it to a correct zero value.
v.Set(zeroInterfaceValue())
} else if w, ok := genInterfaceWrapper(nod, nil); ok {
return w(f)
v = value(f)
}
return v.Interface().(valueInterface).value
}

View File

@@ -6,7 +6,6 @@ package stdlib
import (
"compress/flate"
"fmt"
"go/constant"
"go/token"
"io"
@@ -43,22 +42,16 @@ func init() {
// _compress_flate_Reader is an interface wrapper for Reader type
type _compress_flate_Reader struct {
Val interface{}
WRead func(p []byte) (n int, err error)
WReadByte func() (byte, error)
}
func (W _compress_flate_Reader) String() string { return fmt.Sprint(W.Val) }
func (W _compress_flate_Reader) Read(p []byte) (n int, err error) { return W.WRead(p) }
func (W _compress_flate_Reader) ReadByte() (byte, error) { return W.WReadByte() }
// _compress_flate_Resetter is an interface wrapper for Resetter type
type _compress_flate_Resetter struct {
Val interface{}
WReset func(r io.Reader, dict []byte) error
}
func (W _compress_flate_Resetter) String() string { return fmt.Sprint(W.Val) }
func (W _compress_flate_Resetter) Reset(r io.Reader, dict []byte) error { return W.WReset(r, dict) }

View File

@@ -6,7 +6,6 @@ package stdlib
import (
"compress/zlib"
"fmt"
"go/constant"
"go/token"
"io"
@@ -41,10 +40,7 @@ func init() {
// _compress_zlib_Resetter is an interface wrapper for Resetter type
type _compress_zlib_Resetter struct {
Val interface{}
WReset func(r io.Reader, dict []byte) error
}
func (W _compress_zlib_Resetter) String() string { return fmt.Sprint(W.Val) }
func (W _compress_zlib_Resetter) Reset(r io.Reader, dict []byte) error { return W.WReset(r, dict) }

View File

@@ -6,7 +6,6 @@ package stdlib
import (
"container/heap"
"fmt"
"reflect"
)
@@ -29,7 +28,6 @@ func init() {
// _container_heap_Interface is an interface wrapper for Interface type
type _container_heap_Interface struct {
Val interface{}
WLen func() int
WLess func(i int, j int) bool
WPop func() interface{}
@@ -37,8 +35,6 @@ type _container_heap_Interface struct {
WSwap func(i int, j int)
}
func (W _container_heap_Interface) String() string { return fmt.Sprint(W.Val) }
func (W _container_heap_Interface) Len() int { return W.WLen() }
func (W _container_heap_Interface) Less(i int, j int) bool { return W.WLess(i, j) }
func (W _container_heap_Interface) Pop() interface{} { return W.WPop() }

View File

@@ -6,7 +6,6 @@ package stdlib
import (
"context"
"fmt"
"reflect"
"time"
)
@@ -34,15 +33,12 @@ func init() {
// _context_Context is an interface wrapper for Context type
type _context_Context struct {
Val interface{}
WDeadline func() (deadline time.Time, ok bool)
WDone func() <-chan struct{}
WErr func() error
WValue func(key interface{}) interface{}
}
func (W _context_Context) String() string { return fmt.Sprint(W.Val) }
func (W _context_Context) Deadline() (deadline time.Time, ok bool) { return W.WDeadline() }
func (W _context_Context) Done() <-chan struct{} { return W.WDone() }
func (W _context_Context) Err() error { return W.WErr() }

View File

@@ -6,7 +6,6 @@ package stdlib
import (
"crypto"
"fmt"
"io"
"reflect"
)
@@ -56,13 +55,10 @@ func init() {
// _crypto_Decrypter is an interface wrapper for Decrypter type
type _crypto_Decrypter struct {
Val interface{}
WDecrypt func(rand io.Reader, msg []byte, opts crypto.DecrypterOpts) (plaintext []byte, err error)
WPublic func() crypto.PublicKey
}
func (W _crypto_Decrypter) String() string { return fmt.Sprint(W.Val) }
func (W _crypto_Decrypter) Decrypt(rand io.Reader, msg []byte, opts crypto.DecrypterOpts) (plaintext []byte, err error) {
return W.WDecrypt(rand, msg, opts)
}
@@ -70,34 +66,22 @@ func (W _crypto_Decrypter) Public() crypto.PublicKey { return W.WPublic() }
// _crypto_DecrypterOpts is an interface wrapper for DecrypterOpts type
type _crypto_DecrypterOpts struct {
Val interface{}
}
func (W _crypto_DecrypterOpts) String() string { return fmt.Sprint(W.Val) }
// _crypto_PrivateKey is an interface wrapper for PrivateKey type
type _crypto_PrivateKey struct {
Val interface{}
}
func (W _crypto_PrivateKey) String() string { return fmt.Sprint(W.Val) }
// _crypto_PublicKey is an interface wrapper for PublicKey type
type _crypto_PublicKey struct {
Val interface{}
}
func (W _crypto_PublicKey) String() string { return fmt.Sprint(W.Val) }
// _crypto_Signer is an interface wrapper for Signer type
type _crypto_Signer struct {
Val interface{}
WPublic func() crypto.PublicKey
WSign func(rand io.Reader, digest []byte, opts crypto.SignerOpts) (signature []byte, err error)
}
func (W _crypto_Signer) String() string { return fmt.Sprint(W.Val) }
func (W _crypto_Signer) Public() crypto.PublicKey { return W.WPublic() }
func (W _crypto_Signer) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) (signature []byte, err error) {
return W.WSign(rand, digest, opts)
@@ -105,10 +89,7 @@ func (W _crypto_Signer) Sign(rand io.Reader, digest []byte, opts crypto.SignerOp
// _crypto_SignerOpts is an interface wrapper for SignerOpts type
type _crypto_SignerOpts struct {
Val interface{}
WHashFunc func() crypto.Hash
}
func (W _crypto_SignerOpts) String() string { return fmt.Sprint(W.Val) }
func (W _crypto_SignerOpts) HashFunc() crypto.Hash { return W.WHashFunc() }

View File

@@ -6,7 +6,6 @@ package stdlib
import (
"crypto/cipher"
"fmt"
"reflect"
)
@@ -41,15 +40,12 @@ func init() {
// _crypto_cipher_AEAD is an interface wrapper for AEAD type
type _crypto_cipher_AEAD struct {
Val interface{}
WNonceSize func() int
WOpen func(dst []byte, nonce []byte, ciphertext []byte, additionalData []byte) ([]byte, error)
WOverhead func() int
WSeal func(dst []byte, nonce []byte, plaintext []byte, additionalData []byte) []byte
}
func (W _crypto_cipher_AEAD) String() string { return fmt.Sprint(W.Val) }
func (W _crypto_cipher_AEAD) NonceSize() int { return W.WNonceSize() }
func (W _crypto_cipher_AEAD) Open(dst []byte, nonce []byte, ciphertext []byte, additionalData []byte) ([]byte, error) {
return W.WOpen(dst, nonce, ciphertext, additionalData)
@@ -61,36 +57,27 @@ func (W _crypto_cipher_AEAD) Seal(dst []byte, nonce []byte, plaintext []byte, ad
// _crypto_cipher_Block is an interface wrapper for Block type
type _crypto_cipher_Block struct {
Val interface{}
WBlockSize func() int
WDecrypt func(dst []byte, src []byte)
WEncrypt func(dst []byte, src []byte)
}
func (W _crypto_cipher_Block) String() string { return fmt.Sprint(W.Val) }
func (W _crypto_cipher_Block) BlockSize() int { return W.WBlockSize() }
func (W _crypto_cipher_Block) Decrypt(dst []byte, src []byte) { W.WDecrypt(dst, src) }
func (W _crypto_cipher_Block) Encrypt(dst []byte, src []byte) { W.WEncrypt(dst, src) }
// _crypto_cipher_BlockMode is an interface wrapper for BlockMode type
type _crypto_cipher_BlockMode struct {
Val interface{}
WBlockSize func() int
WCryptBlocks func(dst []byte, src []byte)
}
func (W _crypto_cipher_BlockMode) String() string { return fmt.Sprint(W.Val) }
func (W _crypto_cipher_BlockMode) BlockSize() int { return W.WBlockSize() }
func (W _crypto_cipher_BlockMode) CryptBlocks(dst []byte, src []byte) { W.WCryptBlocks(dst, src) }
// _crypto_cipher_Stream is an interface wrapper for Stream type
type _crypto_cipher_Stream struct {
Val interface{}
WXORKeyStream func(dst []byte, src []byte)
}
func (W _crypto_cipher_Stream) String() string { return fmt.Sprint(W.Val) }
func (W _crypto_cipher_Stream) XORKeyStream(dst []byte, src []byte) { W.WXORKeyStream(dst, src) }

View File

@@ -6,7 +6,6 @@ package stdlib
import (
"crypto/elliptic"
"fmt"
"math/big"
"reflect"
)
@@ -33,7 +32,6 @@ func init() {
// _crypto_elliptic_Curve is an interface wrapper for Curve type
type _crypto_elliptic_Curve struct {
Val interface{}
WAdd func(x1 *big.Int, y1 *big.Int, x2 *big.Int, y2 *big.Int) (x *big.Int, y *big.Int)
WDouble func(x1 *big.Int, y1 *big.Int) (x *big.Int, y *big.Int)
WIsOnCurve func(x *big.Int, y *big.Int) bool
@@ -42,8 +40,6 @@ type _crypto_elliptic_Curve struct {
WScalarMult func(x1 *big.Int, y1 *big.Int, k []byte) (x *big.Int, y *big.Int)
}
func (W _crypto_elliptic_Curve) String() string { return fmt.Sprint(W.Val) }
func (W _crypto_elliptic_Curve) Add(x1 *big.Int, y1 *big.Int, x2 *big.Int, y2 *big.Int) (x *big.Int, y *big.Int) {
return W.WAdd(x1, y1, x2, y2)
}

View File

@@ -6,7 +6,6 @@ package stdlib
import (
"crypto/tls"
"fmt"
"go/constant"
"go/token"
"reflect"
@@ -102,13 +101,10 @@ func init() {
// _crypto_tls_ClientSessionCache is an interface wrapper for ClientSessionCache type
type _crypto_tls_ClientSessionCache struct {
Val interface{}
WGet func(sessionKey string) (session *tls.ClientSessionState, ok bool)
WPut func(sessionKey string, cs *tls.ClientSessionState)
}
func (W _crypto_tls_ClientSessionCache) String() string { return fmt.Sprint(W.Val) }
func (W _crypto_tls_ClientSessionCache) Get(sessionKey string) (session *tls.ClientSessionState, ok bool) {
return W.WGet(sessionKey)
}

View File

@@ -6,7 +6,6 @@ package stdlib
import (
"database/sql"
"fmt"
"reflect"
)
@@ -61,22 +60,16 @@ func init() {
// _database_sql_Result is an interface wrapper for Result type
type _database_sql_Result struct {
Val interface{}
WLastInsertId func() (int64, error)
WRowsAffected func() (int64, error)
}
func (W _database_sql_Result) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_Result) LastInsertId() (int64, error) { return W.WLastInsertId() }
func (W _database_sql_Result) RowsAffected() (int64, error) { return W.WRowsAffected() }
// _database_sql_Scanner is an interface wrapper for Scanner type
type _database_sql_Scanner struct {
Val interface{}
WScan func(src interface{}) error
}
func (W _database_sql_Scanner) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_Scanner) Scan(src interface{}) error { return W.WScan(src) }

View File

@@ -7,7 +7,6 @@ package stdlib
import (
"context"
"database/sql/driver"
"fmt"
"reflect"
)
@@ -97,26 +96,20 @@ func init() {
// _database_sql_driver_ColumnConverter is an interface wrapper for ColumnConverter type
type _database_sql_driver_ColumnConverter struct {
Val interface{}
WColumnConverter func(idx int) driver.ValueConverter
}
func (W _database_sql_driver_ColumnConverter) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_ColumnConverter) ColumnConverter(idx int) driver.ValueConverter {
return W.WColumnConverter(idx)
}
// _database_sql_driver_Conn is an interface wrapper for Conn type
type _database_sql_driver_Conn struct {
Val interface{}
WBegin func() (driver.Tx, error)
WClose func() error
WPrepare func(query string) (driver.Stmt, error)
}
func (W _database_sql_driver_Conn) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_Conn) Begin() (driver.Tx, error) { return W.WBegin() }
func (W _database_sql_driver_Conn) Close() error { return W.WClose() }
func (W _database_sql_driver_Conn) Prepare(query string) (driver.Stmt, error) {
@@ -125,37 +118,28 @@ func (W _database_sql_driver_Conn) Prepare(query string) (driver.Stmt, error) {
// _database_sql_driver_ConnBeginTx is an interface wrapper for ConnBeginTx type
type _database_sql_driver_ConnBeginTx struct {
Val interface{}
WBeginTx func(ctx context.Context, opts driver.TxOptions) (driver.Tx, error)
}
func (W _database_sql_driver_ConnBeginTx) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_ConnBeginTx) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, error) {
return W.WBeginTx(ctx, opts)
}
// _database_sql_driver_ConnPrepareContext is an interface wrapper for ConnPrepareContext type
type _database_sql_driver_ConnPrepareContext struct {
Val interface{}
WPrepareContext func(ctx context.Context, query string) (driver.Stmt, error)
}
func (W _database_sql_driver_ConnPrepareContext) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_ConnPrepareContext) PrepareContext(ctx context.Context, query string) (driver.Stmt, error) {
return W.WPrepareContext(ctx, query)
}
// _database_sql_driver_Connector is an interface wrapper for Connector type
type _database_sql_driver_Connector struct {
Val interface{}
WConnect func(a0 context.Context) (driver.Conn, error)
WDriver func() driver.Driver
}
func (W _database_sql_driver_Connector) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_Connector) Connect(a0 context.Context) (driver.Conn, error) {
return W.WConnect(a0)
}
@@ -163,133 +147,100 @@ func (W _database_sql_driver_Connector) Driver() driver.Driver { return W.WDrive
// _database_sql_driver_Driver is an interface wrapper for Driver type
type _database_sql_driver_Driver struct {
Val interface{}
WOpen func(name string) (driver.Conn, error)
}
func (W _database_sql_driver_Driver) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_Driver) Open(name string) (driver.Conn, error) { return W.WOpen(name) }
// _database_sql_driver_DriverContext is an interface wrapper for DriverContext type
type _database_sql_driver_DriverContext struct {
Val interface{}
WOpenConnector func(name string) (driver.Connector, error)
}
func (W _database_sql_driver_DriverContext) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_DriverContext) OpenConnector(name string) (driver.Connector, error) {
return W.WOpenConnector(name)
}
// _database_sql_driver_Execer is an interface wrapper for Execer type
type _database_sql_driver_Execer struct {
Val interface{}
WExec func(query string, args []driver.Value) (driver.Result, error)
}
func (W _database_sql_driver_Execer) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_Execer) Exec(query string, args []driver.Value) (driver.Result, error) {
return W.WExec(query, args)
}
// _database_sql_driver_ExecerContext is an interface wrapper for ExecerContext type
type _database_sql_driver_ExecerContext struct {
Val interface{}
WExecContext func(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error)
}
func (W _database_sql_driver_ExecerContext) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_ExecerContext) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error) {
return W.WExecContext(ctx, query, args)
}
// _database_sql_driver_NamedValueChecker is an interface wrapper for NamedValueChecker type
type _database_sql_driver_NamedValueChecker struct {
Val interface{}
WCheckNamedValue func(a0 *driver.NamedValue) error
}
func (W _database_sql_driver_NamedValueChecker) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_NamedValueChecker) CheckNamedValue(a0 *driver.NamedValue) error {
return W.WCheckNamedValue(a0)
}
// _database_sql_driver_Pinger is an interface wrapper for Pinger type
type _database_sql_driver_Pinger struct {
Val interface{}
WPing func(ctx context.Context) error
}
func (W _database_sql_driver_Pinger) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_Pinger) Ping(ctx context.Context) error { return W.WPing(ctx) }
// _database_sql_driver_Queryer is an interface wrapper for Queryer type
type _database_sql_driver_Queryer struct {
Val interface{}
WQuery func(query string, args []driver.Value) (driver.Rows, error)
}
func (W _database_sql_driver_Queryer) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_Queryer) Query(query string, args []driver.Value) (driver.Rows, error) {
return W.WQuery(query, args)
}
// _database_sql_driver_QueryerContext is an interface wrapper for QueryerContext type
type _database_sql_driver_QueryerContext struct {
Val interface{}
WQueryContext func(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error)
}
func (W _database_sql_driver_QueryerContext) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_QueryerContext) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error) {
return W.WQueryContext(ctx, query, args)
}
// _database_sql_driver_Result is an interface wrapper for Result type
type _database_sql_driver_Result struct {
Val interface{}
WLastInsertId func() (int64, error)
WRowsAffected func() (int64, error)
}
func (W _database_sql_driver_Result) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_Result) LastInsertId() (int64, error) { return W.WLastInsertId() }
func (W _database_sql_driver_Result) RowsAffected() (int64, error) { return W.WRowsAffected() }
// _database_sql_driver_Rows is an interface wrapper for Rows type
type _database_sql_driver_Rows struct {
Val interface{}
WClose func() error
WColumns func() []string
WNext func(dest []driver.Value) error
}
func (W _database_sql_driver_Rows) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_Rows) Close() error { return W.WClose() }
func (W _database_sql_driver_Rows) Columns() []string { return W.WColumns() }
func (W _database_sql_driver_Rows) Next(dest []driver.Value) error { return W.WNext(dest) }
// _database_sql_driver_RowsColumnTypeDatabaseTypeName is an interface wrapper for RowsColumnTypeDatabaseTypeName type
type _database_sql_driver_RowsColumnTypeDatabaseTypeName struct {
Val interface{}
WClose func() error
WColumnTypeDatabaseTypeName func(index int) string
WColumns func() []string
WNext func(dest []driver.Value) error
}
func (W _database_sql_driver_RowsColumnTypeDatabaseTypeName) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_RowsColumnTypeDatabaseTypeName) Close() error { return W.WClose() }
func (W _database_sql_driver_RowsColumnTypeDatabaseTypeName) ColumnTypeDatabaseTypeName(index int) string {
return W.WColumnTypeDatabaseTypeName(index)
@@ -301,15 +252,12 @@ func (W _database_sql_driver_RowsColumnTypeDatabaseTypeName) Next(dest []driver.
// _database_sql_driver_RowsColumnTypeLength is an interface wrapper for RowsColumnTypeLength type
type _database_sql_driver_RowsColumnTypeLength struct {
Val interface{}
WClose func() error
WColumnTypeLength func(index int) (length int64, ok bool)
WColumns func() []string
WNext func(dest []driver.Value) error
}
func (W _database_sql_driver_RowsColumnTypeLength) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_RowsColumnTypeLength) Close() error { return W.WClose() }
func (W _database_sql_driver_RowsColumnTypeLength) ColumnTypeLength(index int) (length int64, ok bool) {
return W.WColumnTypeLength(index)
@@ -321,15 +269,12 @@ func (W _database_sql_driver_RowsColumnTypeLength) Next(dest []driver.Value) err
// _database_sql_driver_RowsColumnTypeNullable is an interface wrapper for RowsColumnTypeNullable type
type _database_sql_driver_RowsColumnTypeNullable struct {
Val interface{}
WClose func() error
WColumnTypeNullable func(index int) (nullable bool, ok bool)
WColumns func() []string
WNext func(dest []driver.Value) error
}
func (W _database_sql_driver_RowsColumnTypeNullable) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_RowsColumnTypeNullable) Close() error { return W.WClose() }
func (W _database_sql_driver_RowsColumnTypeNullable) ColumnTypeNullable(index int) (nullable bool, ok bool) {
return W.WColumnTypeNullable(index)
@@ -341,15 +286,12 @@ func (W _database_sql_driver_RowsColumnTypeNullable) Next(dest []driver.Value) e
// _database_sql_driver_RowsColumnTypePrecisionScale is an interface wrapper for RowsColumnTypePrecisionScale type
type _database_sql_driver_RowsColumnTypePrecisionScale struct {
Val interface{}
WClose func() error
WColumnTypePrecisionScale func(index int) (precision int64, scale int64, ok bool)
WColumns func() []string
WNext func(dest []driver.Value) error
}
func (W _database_sql_driver_RowsColumnTypePrecisionScale) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_RowsColumnTypePrecisionScale) Close() error { return W.WClose() }
func (W _database_sql_driver_RowsColumnTypePrecisionScale) ColumnTypePrecisionScale(index int) (precision int64, scale int64, ok bool) {
return W.WColumnTypePrecisionScale(index)
@@ -361,15 +303,12 @@ func (W _database_sql_driver_RowsColumnTypePrecisionScale) Next(dest []driver.Va
// _database_sql_driver_RowsColumnTypeScanType is an interface wrapper for RowsColumnTypeScanType type
type _database_sql_driver_RowsColumnTypeScanType struct {
Val interface{}
WClose func() error
WColumnTypeScanType func(index int) reflect.Type
WColumns func() []string
WNext func(dest []driver.Value) error
}
func (W _database_sql_driver_RowsColumnTypeScanType) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_RowsColumnTypeScanType) Close() error { return W.WClose() }
func (W _database_sql_driver_RowsColumnTypeScanType) ColumnTypeScanType(index int) reflect.Type {
return W.WColumnTypeScanType(index)
@@ -381,7 +320,6 @@ func (W _database_sql_driver_RowsColumnTypeScanType) Next(dest []driver.Value) e
// _database_sql_driver_RowsNextResultSet is an interface wrapper for RowsNextResultSet type
type _database_sql_driver_RowsNextResultSet struct {
Val interface{}
WClose func() error
WColumns func() []string
WHasNextResultSet func() bool
@@ -389,8 +327,6 @@ type _database_sql_driver_RowsNextResultSet struct {
WNextResultSet func() error
}
func (W _database_sql_driver_RowsNextResultSet) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_RowsNextResultSet) Close() error { return W.WClose() }
func (W _database_sql_driver_RowsNextResultSet) Columns() []string { return W.WColumns() }
func (W _database_sql_driver_RowsNextResultSet) HasNextResultSet() bool {
@@ -403,27 +339,21 @@ func (W _database_sql_driver_RowsNextResultSet) NextResultSet() error { return W
// _database_sql_driver_SessionResetter is an interface wrapper for SessionResetter type
type _database_sql_driver_SessionResetter struct {
Val interface{}
WResetSession func(ctx context.Context) error
}
func (W _database_sql_driver_SessionResetter) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_SessionResetter) ResetSession(ctx context.Context) error {
return W.WResetSession(ctx)
}
// _database_sql_driver_Stmt is an interface wrapper for Stmt type
type _database_sql_driver_Stmt struct {
Val interface{}
WClose func() error
WExec func(args []driver.Value) (driver.Result, error)
WNumInput func() int
WQuery func(args []driver.Value) (driver.Rows, error)
}
func (W _database_sql_driver_Stmt) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_Stmt) Close() error { return W.WClose() }
func (W _database_sql_driver_Stmt) Exec(args []driver.Value) (driver.Result, error) {
return W.WExec(args)
@@ -435,65 +365,47 @@ func (W _database_sql_driver_Stmt) Query(args []driver.Value) (driver.Rows, erro
// _database_sql_driver_StmtExecContext is an interface wrapper for StmtExecContext type
type _database_sql_driver_StmtExecContext struct {
Val interface{}
WExecContext func(ctx context.Context, args []driver.NamedValue) (driver.Result, error)
}
func (W _database_sql_driver_StmtExecContext) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_StmtExecContext) ExecContext(ctx context.Context, args []driver.NamedValue) (driver.Result, error) {
return W.WExecContext(ctx, args)
}
// _database_sql_driver_StmtQueryContext is an interface wrapper for StmtQueryContext type
type _database_sql_driver_StmtQueryContext struct {
Val interface{}
WQueryContext func(ctx context.Context, args []driver.NamedValue) (driver.Rows, error)
}
func (W _database_sql_driver_StmtQueryContext) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_StmtQueryContext) QueryContext(ctx context.Context, args []driver.NamedValue) (driver.Rows, error) {
return W.WQueryContext(ctx, args)
}
// _database_sql_driver_Tx is an interface wrapper for Tx type
type _database_sql_driver_Tx struct {
Val interface{}
WCommit func() error
WRollback func() error
}
func (W _database_sql_driver_Tx) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_Tx) Commit() error { return W.WCommit() }
func (W _database_sql_driver_Tx) Rollback() error { return W.WRollback() }
// _database_sql_driver_Value is an interface wrapper for Value type
type _database_sql_driver_Value struct {
Val interface{}
}
func (W _database_sql_driver_Value) String() string { return fmt.Sprint(W.Val) }
// _database_sql_driver_ValueConverter is an interface wrapper for ValueConverter type
type _database_sql_driver_ValueConverter struct {
Val interface{}
WConvertValue func(v interface{}) (driver.Value, error)
}
func (W _database_sql_driver_ValueConverter) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_ValueConverter) ConvertValue(v interface{}) (driver.Value, error) {
return W.WConvertValue(v)
}
// _database_sql_driver_Valuer is an interface wrapper for Valuer type
type _database_sql_driver_Valuer struct {
Val interface{}
WValue func() (driver.Value, error)
}
func (W _database_sql_driver_Valuer) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_Valuer) Value() (driver.Value, error) { return W.WValue() }

View File

@@ -209,7 +209,6 @@ func init() {
// _debug_dwarf_Type is an interface wrapper for Type type
type _debug_dwarf_Type struct {
Val interface{}
WCommon func() *dwarf.CommonType
WSize func() int64
WString func() string

View File

@@ -6,7 +6,6 @@ package stdlib
import (
"debug/macho"
"fmt"
"reflect"
)
@@ -151,10 +150,7 @@ func init() {
// _debug_macho_Load is an interface wrapper for Load type
type _debug_macho_Load struct {
Val interface{}
WRaw func() []byte
}
func (W _debug_macho_Load) String() string { return fmt.Sprint(W.Val) }
func (W _debug_macho_Load) Raw() []byte { return W.WRaw() }

View File

@@ -6,7 +6,6 @@ package stdlib
import (
"encoding"
"fmt"
"reflect"
)
@@ -28,42 +27,30 @@ func init() {
// _encoding_BinaryMarshaler is an interface wrapper for BinaryMarshaler type
type _encoding_BinaryMarshaler struct {
Val interface{}
WMarshalBinary func() (data []byte, err error)
}
func (W _encoding_BinaryMarshaler) String() string { return fmt.Sprint(W.Val) }
func (W _encoding_BinaryMarshaler) MarshalBinary() (data []byte, err error) { return W.WMarshalBinary() }
// _encoding_BinaryUnmarshaler is an interface wrapper for BinaryUnmarshaler type
type _encoding_BinaryUnmarshaler struct {
Val interface{}
WUnmarshalBinary func(data []byte) error
}
func (W _encoding_BinaryUnmarshaler) String() string { return fmt.Sprint(W.Val) }
func (W _encoding_BinaryUnmarshaler) UnmarshalBinary(data []byte) error {
return W.WUnmarshalBinary(data)
}
// _encoding_TextMarshaler is an interface wrapper for TextMarshaler type
type _encoding_TextMarshaler struct {
Val interface{}
WMarshalText func() (text []byte, err error)
}
func (W _encoding_TextMarshaler) String() string { return fmt.Sprint(W.Val) }
func (W _encoding_TextMarshaler) MarshalText() (text []byte, err error) { return W.WMarshalText() }
// _encoding_TextUnmarshaler is an interface wrapper for TextUnmarshaler type
type _encoding_TextUnmarshaler struct {
Val interface{}
WUnmarshalText func(text []byte) error
}
func (W _encoding_TextUnmarshaler) String() string { return fmt.Sprint(W.Val) }
func (W _encoding_TextUnmarshaler) UnmarshalText(text []byte) error { return W.WUnmarshalText(text) }

View File

@@ -39,7 +39,6 @@ func init() {
// _encoding_binary_ByteOrder is an interface wrapper for ByteOrder type
type _encoding_binary_ByteOrder struct {
Val interface{}
WPutUint16 func(a0 []byte, a1 uint16)
WPutUint32 func(a0 []byte, a1 uint32)
WPutUint64 func(a0 []byte, a1 uint64)

View File

@@ -6,7 +6,6 @@ package stdlib
import (
"encoding/gob"
"fmt"
"reflect"
)
@@ -33,20 +32,14 @@ func init() {
// _encoding_gob_GobDecoder is an interface wrapper for GobDecoder type
type _encoding_gob_GobDecoder struct {
Val interface{}
WGobDecode func(a0 []byte) error
}
func (W _encoding_gob_GobDecoder) String() string { return fmt.Sprint(W.Val) }
func (W _encoding_gob_GobDecoder) GobDecode(a0 []byte) error { return W.WGobDecode(a0) }
// _encoding_gob_GobEncoder is an interface wrapper for GobEncoder type
type _encoding_gob_GobEncoder struct {
Val interface{}
WGobEncode func() ([]byte, error)
}
func (W _encoding_gob_GobEncoder) String() string { return fmt.Sprint(W.Val) }
func (W _encoding_gob_GobEncoder) GobEncode() ([]byte, error) { return W.WGobEncode() }

View File

@@ -6,7 +6,6 @@ package stdlib
import (
"encoding/json"
"fmt"
"reflect"
)
@@ -50,27 +49,18 @@ func init() {
// _encoding_json_Marshaler is an interface wrapper for Marshaler type
type _encoding_json_Marshaler struct {
Val interface{}
WMarshalJSON func() ([]byte, error)
}
func (W _encoding_json_Marshaler) String() string { return fmt.Sprint(W.Val) }
func (W _encoding_json_Marshaler) MarshalJSON() ([]byte, error) { return W.WMarshalJSON() }
// _encoding_json_Token is an interface wrapper for Token type
type _encoding_json_Token struct {
Val interface{}
}
func (W _encoding_json_Token) String() string { return fmt.Sprint(W.Val) }
// _encoding_json_Unmarshaler is an interface wrapper for Unmarshaler type
type _encoding_json_Unmarshaler struct {
Val interface{}
WUnmarshalJSON func(a0 []byte) error
}
func (W _encoding_json_Unmarshaler) String() string { return fmt.Sprint(W.Val) }
func (W _encoding_json_Unmarshaler) UnmarshalJSON(a0 []byte) error { return W.WUnmarshalJSON(a0) }

View File

@@ -6,7 +6,6 @@ package stdlib
import (
"encoding/xml"
"fmt"
"reflect"
)
@@ -60,65 +59,47 @@ func init() {
// _encoding_xml_Marshaler is an interface wrapper for Marshaler type
type _encoding_xml_Marshaler struct {
Val interface{}
WMarshalXML func(e *xml.Encoder, start xml.StartElement) error
}
func (W _encoding_xml_Marshaler) String() string { return fmt.Sprint(W.Val) }
func (W _encoding_xml_Marshaler) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return W.WMarshalXML(e, start)
}
// _encoding_xml_MarshalerAttr is an interface wrapper for MarshalerAttr type
type _encoding_xml_MarshalerAttr struct {
Val interface{}
WMarshalXMLAttr func(name xml.Name) (xml.Attr, error)
}
func (W _encoding_xml_MarshalerAttr) String() string { return fmt.Sprint(W.Val) }
func (W _encoding_xml_MarshalerAttr) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
return W.WMarshalXMLAttr(name)
}
// _encoding_xml_Token is an interface wrapper for Token type
type _encoding_xml_Token struct {
Val interface{}
}
func (W _encoding_xml_Token) String() string { return fmt.Sprint(W.Val) }
// _encoding_xml_TokenReader is an interface wrapper for TokenReader type
type _encoding_xml_TokenReader struct {
Val interface{}
WToken func() (xml.Token, error)
}
func (W _encoding_xml_TokenReader) String() string { return fmt.Sprint(W.Val) }
func (W _encoding_xml_TokenReader) Token() (xml.Token, error) { return W.WToken() }
// _encoding_xml_Unmarshaler is an interface wrapper for Unmarshaler type
type _encoding_xml_Unmarshaler struct {
Val interface{}
WUnmarshalXML func(d *xml.Decoder, start xml.StartElement) error
}
func (W _encoding_xml_Unmarshaler) String() string { return fmt.Sprint(W.Val) }
func (W _encoding_xml_Unmarshaler) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
return W.WUnmarshalXML(d, start)
}
// _encoding_xml_UnmarshalerAttr is an interface wrapper for UnmarshalerAttr type
type _encoding_xml_UnmarshalerAttr struct {
Val interface{}
WUnmarshalXMLAttr func(attr xml.Attr) error
}
func (W _encoding_xml_UnmarshalerAttr) String() string { return fmt.Sprint(W.Val) }
func (W _encoding_xml_UnmarshalerAttr) UnmarshalXMLAttr(attr xml.Attr) error {
return W.WUnmarshalXMLAttr(attr)
}

View File

@@ -37,7 +37,6 @@ func init() {
// _expvar_Var is an interface wrapper for Var type
type _expvar_Var struct {
Val interface{}
WString func() string
}

View File

@@ -64,7 +64,6 @@ func init() {
// _flag_Getter is an interface wrapper for Getter type
type _flag_Getter struct {
Val interface{}
WGet func() interface{}
WSet func(a0 string) error
WString func() string
@@ -76,7 +75,6 @@ func (W _flag_Getter) String() string { return W.WString() }
// _flag_Value is an interface wrapper for Value type
type _flag_Value struct {
Val interface{}
WSet func(a0 string) error
WString func() string
}

View File

@@ -52,27 +52,20 @@ func init() {
// _fmt_Formatter is an interface wrapper for Formatter type
type _fmt_Formatter struct {
Val interface{}
WFormat func(f fmt.State, c rune)
}
func (W _fmt_Formatter) String() string { return fmt.Sprint(W.Val) }
func (W _fmt_Formatter) Format(f fmt.State, c rune) { W.WFormat(f, c) }
// _fmt_GoStringer is an interface wrapper for GoStringer type
type _fmt_GoStringer struct {
Val interface{}
WGoString func() string
}
func (W _fmt_GoStringer) String() string { return fmt.Sprint(W.Val) }
func (W _fmt_GoStringer) GoString() string { return W.WGoString() }
// _fmt_ScanState is an interface wrapper for ScanState type
type _fmt_ScanState struct {
Val interface{}
WRead func(buf []byte) (n int, err error)
WReadRune func() (r rune, size int, err error)
WSkipSpace func()
@@ -81,8 +74,6 @@ type _fmt_ScanState struct {
WWidth func() (wid int, ok bool)
}
func (W _fmt_ScanState) String() string { return fmt.Sprint(W.Val) }
func (W _fmt_ScanState) Read(buf []byte) (n int, err error) { return W.WRead(buf) }
func (W _fmt_ScanState) ReadRune() (r rune, size int, err error) { return W.WReadRune() }
func (W _fmt_ScanState) SkipSpace() { W.WSkipSpace() }
@@ -94,25 +85,19 @@ func (W _fmt_ScanState) Width() (wid int, ok bool) { return W.WWidth() }
// _fmt_Scanner is an interface wrapper for Scanner type
type _fmt_Scanner struct {
Val interface{}
WScan func(state fmt.ScanState, verb rune) error
}
func (W _fmt_Scanner) String() string { return fmt.Sprint(W.Val) }
func (W _fmt_Scanner) Scan(state fmt.ScanState, verb rune) error { return W.WScan(state, verb) }
// _fmt_State is an interface wrapper for State type
type _fmt_State struct {
Val interface{}
WFlag func(c int) bool
WPrecision func() (prec int, ok bool)
WWidth func() (wid int, ok bool)
WWrite func(b []byte) (n int, err error)
}
func (W _fmt_State) String() string { return fmt.Sprint(W.Val) }
func (W _fmt_State) Flag(c int) bool { return W.WFlag(c) }
func (W _fmt_State) Precision() (prec int, ok bool) { return W.WPrecision() }
func (W _fmt_State) Width() (wid int, ok bool) { return W.WWidth() }
@@ -120,7 +105,6 @@ func (W _fmt_State) Write(b []byte) (n int, err error) { return W.WWrite(b) }
// _fmt_Stringer is an interface wrapper for Stringer type
type _fmt_Stringer struct {
Val interface{}
WString func() string
}

View File

@@ -5,7 +5,6 @@
package stdlib
import (
"fmt"
"go/ast"
"go/token"
"reflect"
@@ -129,70 +128,52 @@ func init() {
// _go_ast_Decl is an interface wrapper for Decl type
type _go_ast_Decl struct {
Val interface{}
WEnd func() token.Pos
WPos func() token.Pos
}
func (W _go_ast_Decl) String() string { return fmt.Sprint(W.Val) }
func (W _go_ast_Decl) End() token.Pos { return W.WEnd() }
func (W _go_ast_Decl) Pos() token.Pos { return W.WPos() }
// _go_ast_Expr is an interface wrapper for Expr type
type _go_ast_Expr struct {
Val interface{}
WEnd func() token.Pos
WPos func() token.Pos
}
func (W _go_ast_Expr) String() string { return fmt.Sprint(W.Val) }
func (W _go_ast_Expr) End() token.Pos { return W.WEnd() }
func (W _go_ast_Expr) Pos() token.Pos { return W.WPos() }
// _go_ast_Node is an interface wrapper for Node type
type _go_ast_Node struct {
Val interface{}
WEnd func() token.Pos
WPos func() token.Pos
}
func (W _go_ast_Node) String() string { return fmt.Sprint(W.Val) }
func (W _go_ast_Node) End() token.Pos { return W.WEnd() }
func (W _go_ast_Node) Pos() token.Pos { return W.WPos() }
// _go_ast_Spec is an interface wrapper for Spec type
type _go_ast_Spec struct {
Val interface{}
WEnd func() token.Pos
WPos func() token.Pos
}
func (W _go_ast_Spec) String() string { return fmt.Sprint(W.Val) }
func (W _go_ast_Spec) End() token.Pos { return W.WEnd() }
func (W _go_ast_Spec) Pos() token.Pos { return W.WPos() }
// _go_ast_Stmt is an interface wrapper for Stmt type
type _go_ast_Stmt struct {
Val interface{}
WEnd func() token.Pos
WPos func() token.Pos
}
func (W _go_ast_Stmt) String() string { return fmt.Sprint(W.Val) }
func (W _go_ast_Stmt) End() token.Pos { return W.WEnd() }
func (W _go_ast_Stmt) Pos() token.Pos { return W.WPos() }
// _go_ast_Visitor is an interface wrapper for Visitor type
type _go_ast_Visitor struct {
Val interface{}
WVisit func(node ast.Node) (w ast.Visitor)
}
func (W _go_ast_Visitor) String() string { return fmt.Sprint(W.Val) }
func (W _go_ast_Visitor) Visit(node ast.Node) (w ast.Visitor) { return W.WVisit(node) }

View File

@@ -61,7 +61,6 @@ func init() {
// _go_constant_Value is an interface wrapper for Value type
type _go_constant_Value struct {
Val interface{}
WExactString func() string
WKind func() constant.Kind
WString func() string

View File

@@ -5,7 +5,6 @@
package stdlib
import (
"fmt"
"go/token"
"go/types"
"reflect"
@@ -163,23 +162,17 @@ func init() {
// _go_types_Importer is an interface wrapper for Importer type
type _go_types_Importer struct {
Val interface{}
WImport func(path string) (*types.Package, error)
}
func (W _go_types_Importer) String() string { return fmt.Sprint(W.Val) }
func (W _go_types_Importer) Import(path string) (*types.Package, error) { return W.WImport(path) }
// _go_types_ImporterFrom is an interface wrapper for ImporterFrom type
type _go_types_ImporterFrom struct {
Val interface{}
WImport func(path string) (*types.Package, error)
WImportFrom func(path string, dir string, mode types.ImportMode) (*types.Package, error)
}
func (W _go_types_ImporterFrom) String() string { return fmt.Sprint(W.Val) }
func (W _go_types_ImporterFrom) Import(path string) (*types.Package, error) { return W.WImport(path) }
func (W _go_types_ImporterFrom) ImportFrom(path string, dir string, mode types.ImportMode) (*types.Package, error) {
return W.WImportFrom(path, dir, mode)
@@ -187,7 +180,6 @@ func (W _go_types_ImporterFrom) ImportFrom(path string, dir string, mode types.I
// _go_types_Object is an interface wrapper for Object type
type _go_types_Object struct {
Val interface{}
WExported func() bool
WId func() string
WName func() string
@@ -209,21 +201,17 @@ func (W _go_types_Object) Type() types.Type { return W.WType() }
// _go_types_Sizes is an interface wrapper for Sizes type
type _go_types_Sizes struct {
Val interface{}
WAlignof func(T types.Type) int64
WOffsetsof func(fields []*types.Var) []int64
WSizeof func(T types.Type) int64
}
func (W _go_types_Sizes) String() string { return fmt.Sprint(W.Val) }
func (W _go_types_Sizes) Alignof(T types.Type) int64 { return W.WAlignof(T) }
func (W _go_types_Sizes) Offsetsof(fields []*types.Var) []int64 { return W.WOffsetsof(fields) }
func (W _go_types_Sizes) Sizeof(T types.Type) int64 { return W.WSizeof(T) }
// _go_types_Type is an interface wrapper for Type type
type _go_types_Type struct {
Val interface{}
WString func() string
WUnderlying func() types.Type
}

View File

@@ -5,7 +5,6 @@
package stdlib
import (
"fmt"
"hash"
"reflect"
)
@@ -26,7 +25,6 @@ func init() {
// _hash_Hash is an interface wrapper for Hash type
type _hash_Hash struct {
Val interface{}
WBlockSize func() int
WReset func()
WSize func() int
@@ -34,8 +32,6 @@ type _hash_Hash struct {
WWrite func(p []byte) (n int, err error)
}
func (W _hash_Hash) String() string { return fmt.Sprint(W.Val) }
func (W _hash_Hash) BlockSize() int { return W.WBlockSize() }
func (W _hash_Hash) Reset() { W.WReset() }
func (W _hash_Hash) Size() int { return W.WSize() }
@@ -44,7 +40,6 @@ func (W _hash_Hash) Write(p []byte) (n int, err error) { return W.WWrite(p) }
// _hash_Hash32 is an interface wrapper for Hash32 type
type _hash_Hash32 struct {
Val interface{}
WBlockSize func() int
WReset func()
WSize func() int
@@ -53,8 +48,6 @@ type _hash_Hash32 struct {
WWrite func(p []byte) (n int, err error)
}
func (W _hash_Hash32) String() string { return fmt.Sprint(W.Val) }
func (W _hash_Hash32) BlockSize() int { return W.WBlockSize() }
func (W _hash_Hash32) Reset() { W.WReset() }
func (W _hash_Hash32) Size() int { return W.WSize() }
@@ -64,7 +57,6 @@ func (W _hash_Hash32) Write(p []byte) (n int, err error) { return W.WWrite(p) }
// _hash_Hash64 is an interface wrapper for Hash64 type
type _hash_Hash64 struct {
Val interface{}
WBlockSize func() int
WReset func()
WSize func() int
@@ -73,8 +65,6 @@ type _hash_Hash64 struct {
WWrite func(p []byte) (n int, err error)
}
func (W _hash_Hash64) String() string { return fmt.Sprint(W.Val) }
func (W _hash_Hash64) BlockSize() int { return W.WBlockSize() }
func (W _hash_Hash64) Reset() { W.WReset() }
func (W _hash_Hash64) Size() int { return W.WSize() }

View File

@@ -5,7 +5,6 @@
package stdlib
import (
"fmt"
"image"
"image/color"
"reflect"
@@ -75,29 +74,23 @@ func init() {
// _image_Image is an interface wrapper for Image type
type _image_Image struct {
Val interface{}
WAt func(x int, y int) color.Color
WBounds func() image.Rectangle
WColorModel func() color.Model
}
func (W _image_Image) String() string { return fmt.Sprint(W.Val) }
func (W _image_Image) At(x int, y int) color.Color { return W.WAt(x, y) }
func (W _image_Image) Bounds() image.Rectangle { return W.WBounds() }
func (W _image_Image) ColorModel() color.Model { return W.WColorModel() }
// _image_PalettedImage is an interface wrapper for PalettedImage type
type _image_PalettedImage struct {
Val interface{}
WAt func(x int, y int) color.Color
WBounds func() image.Rectangle
WColorIndexAt func(x int, y int) uint8
WColorModel func() color.Model
}
func (W _image_PalettedImage) String() string { return fmt.Sprint(W.Val) }
func (W _image_PalettedImage) At(x int, y int) color.Color { return W.WAt(x, y) }
func (W _image_PalettedImage) Bounds() image.Rectangle { return W.WBounds() }
func (W _image_PalettedImage) ColorIndexAt(x int, y int) uint8 { return W.WColorIndexAt(x, y) }

View File

@@ -5,7 +5,6 @@
package stdlib
import (
"fmt"
"image/color"
"reflect"
)
@@ -58,20 +57,14 @@ func init() {
// _image_color_Color is an interface wrapper for Color type
type _image_color_Color struct {
Val interface{}
WRGBA func() (r uint32, g uint32, b uint32, a uint32)
}
func (W _image_color_Color) String() string { return fmt.Sprint(W.Val) }
func (W _image_color_Color) RGBA() (r uint32, g uint32, b uint32, a uint32) { return W.WRGBA() }
// _image_color_Model is an interface wrapper for Model type
type _image_color_Model struct {
Val interface{}
WConvert func(c color.Color) color.Color
}
func (W _image_color_Model) String() string { return fmt.Sprint(W.Val) }
func (W _image_color_Model) Convert(c color.Color) color.Color { return W.WConvert(c) }

View File

@@ -5,7 +5,6 @@
package stdlib
import (
"fmt"
"image"
"image/color"
"image/draw"
@@ -36,27 +35,21 @@ func init() {
// _image_draw_Drawer is an interface wrapper for Drawer type
type _image_draw_Drawer struct {
Val interface{}
WDraw func(dst draw.Image, r image.Rectangle, src image.Image, sp image.Point)
}
func (W _image_draw_Drawer) String() string { return fmt.Sprint(W.Val) }
func (W _image_draw_Drawer) Draw(dst draw.Image, r image.Rectangle, src image.Image, sp image.Point) {
W.WDraw(dst, r, src, sp)
}
// _image_draw_Image is an interface wrapper for Image type
type _image_draw_Image struct {
Val interface{}
WAt func(x int, y int) color.Color
WBounds func() image.Rectangle
WColorModel func() color.Model
WSet func(x int, y int, c color.Color)
}
func (W _image_draw_Image) String() string { return fmt.Sprint(W.Val) }
func (W _image_draw_Image) At(x int, y int) color.Color { return W.WAt(x, y) }
func (W _image_draw_Image) Bounds() image.Rectangle { return W.WBounds() }
func (W _image_draw_Image) ColorModel() color.Model { return W.WColorModel() }
@@ -64,12 +57,9 @@ func (W _image_draw_Image) Set(x int, y int, c color.Color) { W.WSet(x, y, c) }
// _image_draw_Quantizer is an interface wrapper for Quantizer type
type _image_draw_Quantizer struct {
Val interface{}
WQuantize func(p color.Palette, m image.Image) color.Palette
}
func (W _image_draw_Quantizer) String() string { return fmt.Sprint(W.Val) }
func (W _image_draw_Quantizer) Quantize(p color.Palette, m image.Image) color.Palette {
return W.WQuantize(p, m)
}

View File

@@ -5,7 +5,6 @@
package stdlib
import (
"fmt"
"go/constant"
"go/token"
"image/jpeg"
@@ -33,12 +32,9 @@ func init() {
// _image_jpeg_Reader is an interface wrapper for Reader type
type _image_jpeg_Reader struct {
Val interface{}
WRead func(p []byte) (n int, err error)
WReadByte func() (byte, error)
}
func (W _image_jpeg_Reader) String() string { return fmt.Sprint(W.Val) }
func (W _image_jpeg_Reader) Read(p []byte) (n int, err error) { return W.WRead(p) }
func (W _image_jpeg_Reader) ReadByte() (byte, error) { return W.WReadByte() }

View File

@@ -5,7 +5,6 @@
package stdlib
import (
"fmt"
"image/png"
"reflect"
)
@@ -36,12 +35,9 @@ func init() {
// _image_png_EncoderBufferPool is an interface wrapper for EncoderBufferPool type
type _image_png_EncoderBufferPool struct {
Val interface{}
WGet func() *png.EncoderBuffer
WPut func(a0 *png.EncoderBuffer)
}
func (W _image_png_EncoderBufferPool) String() string { return fmt.Sprint(W.Val) }
func (W _image_png_EncoderBufferPool) Get() *png.EncoderBuffer { return W.WGet() }
func (W _image_png_EncoderBufferPool) Put(a0 *png.EncoderBuffer) { W.WPut(a0) }

View File

@@ -5,7 +5,6 @@
package stdlib
import (
"fmt"
"go/constant"
"go/token"
"io"
@@ -91,67 +90,49 @@ func init() {
// _io_ByteReader is an interface wrapper for ByteReader type
type _io_ByteReader struct {
Val interface{}
WReadByte func() (byte, error)
}
func (W _io_ByteReader) String() string { return fmt.Sprint(W.Val) }
func (W _io_ByteReader) ReadByte() (byte, error) { return W.WReadByte() }
// _io_ByteScanner is an interface wrapper for ByteScanner type
type _io_ByteScanner struct {
Val interface{}
WReadByte func() (byte, error)
WUnreadByte func() error
}
func (W _io_ByteScanner) String() string { return fmt.Sprint(W.Val) }
func (W _io_ByteScanner) ReadByte() (byte, error) { return W.WReadByte() }
func (W _io_ByteScanner) UnreadByte() error { return W.WUnreadByte() }
// _io_ByteWriter is an interface wrapper for ByteWriter type
type _io_ByteWriter struct {
Val interface{}
WWriteByte func(c byte) error
}
func (W _io_ByteWriter) String() string { return fmt.Sprint(W.Val) }
func (W _io_ByteWriter) WriteByte(c byte) error { return W.WWriteByte(c) }
// _io_Closer is an interface wrapper for Closer type
type _io_Closer struct {
Val interface{}
WClose func() error
}
func (W _io_Closer) String() string { return fmt.Sprint(W.Val) }
func (W _io_Closer) Close() error { return W.WClose() }
// _io_ReadCloser is an interface wrapper for ReadCloser type
type _io_ReadCloser struct {
Val interface{}
WClose func() error
WRead func(p []byte) (n int, err error)
}
func (W _io_ReadCloser) String() string { return fmt.Sprint(W.Val) }
func (W _io_ReadCloser) Close() error { return W.WClose() }
func (W _io_ReadCloser) Read(p []byte) (n int, err error) { return W.WRead(p) }
// _io_ReadSeeker is an interface wrapper for ReadSeeker type
type _io_ReadSeeker struct {
Val interface{}
WRead func(p []byte) (n int, err error)
WSeek func(offset int64, whence int) (int64, error)
}
func (W _io_ReadSeeker) String() string { return fmt.Sprint(W.Val) }
func (W _io_ReadSeeker) Read(p []byte) (n int, err error) { return W.WRead(p) }
func (W _io_ReadSeeker) Seek(offset int64, whence int) (int64, error) {
return W.WSeek(offset, whence)
@@ -159,28 +140,22 @@ func (W _io_ReadSeeker) Seek(offset int64, whence int) (int64, error) {
// _io_ReadWriteCloser is an interface wrapper for ReadWriteCloser type
type _io_ReadWriteCloser struct {
Val interface{}
WClose func() error
WRead func(p []byte) (n int, err error)
WWrite func(p []byte) (n int, err error)
}
func (W _io_ReadWriteCloser) String() string { return fmt.Sprint(W.Val) }
func (W _io_ReadWriteCloser) Close() error { return W.WClose() }
func (W _io_ReadWriteCloser) Read(p []byte) (n int, err error) { return W.WRead(p) }
func (W _io_ReadWriteCloser) Write(p []byte) (n int, err error) { return W.WWrite(p) }
// _io_ReadWriteSeeker is an interface wrapper for ReadWriteSeeker type
type _io_ReadWriteSeeker struct {
Val interface{}
WRead func(p []byte) (n int, err error)
WSeek func(offset int64, whence int) (int64, error)
WWrite func(p []byte) (n int, err error)
}
func (W _io_ReadWriteSeeker) String() string { return fmt.Sprint(W.Val) }
func (W _io_ReadWriteSeeker) Read(p []byte) (n int, err error) { return W.WRead(p) }
func (W _io_ReadWriteSeeker) Seek(offset int64, whence int) (int64, error) {
return W.WSeek(offset, whence)
@@ -189,109 +164,79 @@ func (W _io_ReadWriteSeeker) Write(p []byte) (n int, err error) { return W.WWrit
// _io_ReadWriter is an interface wrapper for ReadWriter type
type _io_ReadWriter struct {
Val interface{}
WRead func(p []byte) (n int, err error)
WWrite func(p []byte) (n int, err error)
}
func (W _io_ReadWriter) String() string { return fmt.Sprint(W.Val) }
func (W _io_ReadWriter) Read(p []byte) (n int, err error) { return W.WRead(p) }
func (W _io_ReadWriter) Write(p []byte) (n int, err error) { return W.WWrite(p) }
// _io_Reader is an interface wrapper for Reader type
type _io_Reader struct {
Val interface{}
WRead func(p []byte) (n int, err error)
}
func (W _io_Reader) String() string { return fmt.Sprint(W.Val) }
func (W _io_Reader) Read(p []byte) (n int, err error) { return W.WRead(p) }
// _io_ReaderAt is an interface wrapper for ReaderAt type
type _io_ReaderAt struct {
Val interface{}
WReadAt func(p []byte, off int64) (n int, err error)
}
func (W _io_ReaderAt) String() string { return fmt.Sprint(W.Val) }
func (W _io_ReaderAt) ReadAt(p []byte, off int64) (n int, err error) { return W.WReadAt(p, off) }
// _io_ReaderFrom is an interface wrapper for ReaderFrom type
type _io_ReaderFrom struct {
Val interface{}
WReadFrom func(r io.Reader) (n int64, err error)
}
func (W _io_ReaderFrom) String() string { return fmt.Sprint(W.Val) }
func (W _io_ReaderFrom) ReadFrom(r io.Reader) (n int64, err error) { return W.WReadFrom(r) }
// _io_RuneReader is an interface wrapper for RuneReader type
type _io_RuneReader struct {
Val interface{}
WReadRune func() (r rune, size int, err error)
}
func (W _io_RuneReader) String() string { return fmt.Sprint(W.Val) }
func (W _io_RuneReader) ReadRune() (r rune, size int, err error) { return W.WReadRune() }
// _io_RuneScanner is an interface wrapper for RuneScanner type
type _io_RuneScanner struct {
Val interface{}
WReadRune func() (r rune, size int, err error)
WUnreadRune func() error
}
func (W _io_RuneScanner) String() string { return fmt.Sprint(W.Val) }
func (W _io_RuneScanner) ReadRune() (r rune, size int, err error) { return W.WReadRune() }
func (W _io_RuneScanner) UnreadRune() error { return W.WUnreadRune() }
// _io_Seeker is an interface wrapper for Seeker type
type _io_Seeker struct {
Val interface{}
WSeek func(offset int64, whence int) (int64, error)
}
func (W _io_Seeker) String() string { return fmt.Sprint(W.Val) }
func (W _io_Seeker) Seek(offset int64, whence int) (int64, error) { return W.WSeek(offset, whence) }
// _io_StringWriter is an interface wrapper for StringWriter type
type _io_StringWriter struct {
Val interface{}
WWriteString func(s string) (n int, err error)
}
func (W _io_StringWriter) String() string { return fmt.Sprint(W.Val) }
func (W _io_StringWriter) WriteString(s string) (n int, err error) { return W.WWriteString(s) }
// _io_WriteCloser is an interface wrapper for WriteCloser type
type _io_WriteCloser struct {
Val interface{}
WClose func() error
WWrite func(p []byte) (n int, err error)
}
func (W _io_WriteCloser) String() string { return fmt.Sprint(W.Val) }
func (W _io_WriteCloser) Close() error { return W.WClose() }
func (W _io_WriteCloser) Write(p []byte) (n int, err error) { return W.WWrite(p) }
// _io_WriteSeeker is an interface wrapper for WriteSeeker type
type _io_WriteSeeker struct {
Val interface{}
WSeek func(offset int64, whence int) (int64, error)
WWrite func(p []byte) (n int, err error)
}
func (W _io_WriteSeeker) String() string { return fmt.Sprint(W.Val) }
func (W _io_WriteSeeker) Seek(offset int64, whence int) (int64, error) {
return W.WSeek(offset, whence)
}
@@ -299,30 +244,21 @@ func (W _io_WriteSeeker) Write(p []byte) (n int, err error) { return W.WWrite(p)
// _io_Writer is an interface wrapper for Writer type
type _io_Writer struct {
Val interface{}
WWrite func(p []byte) (n int, err error)
}
func (W _io_Writer) String() string { return fmt.Sprint(W.Val) }
func (W _io_Writer) Write(p []byte) (n int, err error) { return W.WWrite(p) }
// _io_WriterAt is an interface wrapper for WriterAt type
type _io_WriterAt struct {
Val interface{}
WWriteAt func(p []byte, off int64) (n int, err error)
}
func (W _io_WriterAt) String() string { return fmt.Sprint(W.Val) }
func (W _io_WriterAt) WriteAt(p []byte, off int64) (n int, err error) { return W.WWriteAt(p, off) }
// _io_WriterTo is an interface wrapper for WriterTo type
type _io_WriterTo struct {
Val interface{}
WWriteTo func(w io.Writer) (n int64, err error)
}
func (W _io_WriterTo) String() string { return fmt.Sprint(W.Val) }
func (W _io_WriterTo) WriteTo(w io.Writer) (n int64, err error) { return W.WWriteTo(w) }

View File

@@ -5,7 +5,6 @@
package stdlib
import (
"fmt"
"math/rand"
"reflect"
)
@@ -47,26 +46,20 @@ func init() {
// _math_rand_Source is an interface wrapper for Source type
type _math_rand_Source struct {
Val interface{}
WInt63 func() int64
WSeed func(seed int64)
}
func (W _math_rand_Source) String() string { return fmt.Sprint(W.Val) }
func (W _math_rand_Source) Int63() int64 { return W.WInt63() }
func (W _math_rand_Source) Seed(seed int64) { W.WSeed(seed) }
// _math_rand_Source64 is an interface wrapper for Source64 type
type _math_rand_Source64 struct {
Val interface{}
WInt63 func() int64
WSeed func(seed int64)
WUint64 func() uint64
}
func (W _math_rand_Source64) String() string { return fmt.Sprint(W.Val) }
func (W _math_rand_Source64) Int63() int64 { return W.WInt63() }
func (W _math_rand_Source64) Seed(seed int64) { W.WSeed(seed) }
func (W _math_rand_Source64) Uint64() uint64 { return W.WUint64() }

View File

@@ -5,7 +5,6 @@
package stdlib
import (
"fmt"
"mime/multipart"
"reflect"
)
@@ -32,15 +31,12 @@ func init() {
// _mime_multipart_File is an interface wrapper for File type
type _mime_multipart_File struct {
Val interface{}
WClose func() error
WRead func(p []byte) (n int, err error)
WReadAt func(p []byte, off int64) (n int, err error)
WSeek func(offset int64, whence int) (int64, error)
}
func (W _mime_multipart_File) String() string { return fmt.Sprint(W.Val) }
func (W _mime_multipart_File) Close() error { return W.WClose() }
func (W _mime_multipart_File) Read(p []byte) (n int, err error) { return W.WRead(p) }
func (W _mime_multipart_File) ReadAt(p []byte, off int64) (n int, err error) { return W.WReadAt(p, off) }

View File

@@ -5,7 +5,6 @@
package stdlib
import (
"fmt"
"go/constant"
"go/token"
"net"
@@ -127,7 +126,6 @@ func init() {
// _net_Addr is an interface wrapper for Addr type
type _net_Addr struct {
Val interface{}
WNetwork func() string
WString func() string
}
@@ -137,7 +135,6 @@ func (W _net_Addr) String() string { return W.WString() }
// _net_Conn is an interface wrapper for Conn type
type _net_Conn struct {
Val interface{}
WClose func() error
WLocalAddr func() net.Addr
WRead func(b []byte) (n int, err error)
@@ -148,8 +145,6 @@ type _net_Conn struct {
WWrite func(b []byte) (n int, err error)
}
func (W _net_Conn) String() string { return fmt.Sprint(W.Val) }
func (W _net_Conn) Close() error { return W.WClose() }
func (W _net_Conn) LocalAddr() net.Addr { return W.WLocalAddr() }
func (W _net_Conn) Read(b []byte) (n int, err error) { return W.WRead(b) }
@@ -161,35 +156,28 @@ func (W _net_Conn) Write(b []byte) (n int, err error) { return W.WWrite(b) }
// _net_Error is an interface wrapper for Error type
type _net_Error struct {
Val interface{}
WError func() string
WTemporary func() bool
WTimeout func() bool
}
func (W _net_Error) String() string { return fmt.Sprint(W.Val) }
func (W _net_Error) Error() string { return W.WError() }
func (W _net_Error) Temporary() bool { return W.WTemporary() }
func (W _net_Error) Timeout() bool { return W.WTimeout() }
// _net_Listener is an interface wrapper for Listener type
type _net_Listener struct {
Val interface{}
WAccept func() (net.Conn, error)
WAddr func() net.Addr
WClose func() error
}
func (W _net_Listener) String() string { return fmt.Sprint(W.Val) }
func (W _net_Listener) Accept() (net.Conn, error) { return W.WAccept() }
func (W _net_Listener) Addr() net.Addr { return W.WAddr() }
func (W _net_Listener) Close() error { return W.WClose() }
// _net_PacketConn is an interface wrapper for PacketConn type
type _net_PacketConn struct {
Val interface{}
WClose func() error
WLocalAddr func() net.Addr
WReadFrom func(p []byte) (n int, addr net.Addr, err error)
@@ -199,8 +187,6 @@ type _net_PacketConn struct {
WWriteTo func(p []byte, addr net.Addr) (n int, err error)
}
func (W _net_PacketConn) String() string { return fmt.Sprint(W.Val) }
func (W _net_PacketConn) Close() error { return W.WClose() }
func (W _net_PacketConn) LocalAddr() net.Addr { return W.WLocalAddr() }
func (W _net_PacketConn) ReadFrom(p []byte) (n int, addr net.Addr, err error) { return W.WReadFrom(p) }

View File

@@ -6,7 +6,6 @@ package stdlib
import (
"bufio"
"fmt"
"go/constant"
"go/token"
"net"
@@ -208,29 +207,22 @@ func init() {
// _net_http_CloseNotifier is an interface wrapper for CloseNotifier type
type _net_http_CloseNotifier struct {
Val interface{}
WCloseNotify func() <-chan bool
}
func (W _net_http_CloseNotifier) String() string { return fmt.Sprint(W.Val) }
func (W _net_http_CloseNotifier) CloseNotify() <-chan bool { return W.WCloseNotify() }
// _net_http_CookieJar is an interface wrapper for CookieJar type
type _net_http_CookieJar struct {
Val interface{}
WCookies func(u *url.URL) []*http.Cookie
WSetCookies func(u *url.URL, cookies []*http.Cookie)
}
func (W _net_http_CookieJar) String() string { return fmt.Sprint(W.Val) }
func (W _net_http_CookieJar) Cookies(u *url.URL) []*http.Cookie { return W.WCookies(u) }
func (W _net_http_CookieJar) SetCookies(u *url.URL, cookies []*http.Cookie) { W.WSetCookies(u, cookies) }
// _net_http_File is an interface wrapper for File type
type _net_http_File struct {
Val interface{}
WClose func() error
WRead func(p []byte) (n int, err error)
WReaddir func(count int) ([]os.FileInfo, error)
@@ -238,8 +230,6 @@ type _net_http_File struct {
WStat func() (os.FileInfo, error)
}
func (W _net_http_File) String() string { return fmt.Sprint(W.Val) }
func (W _net_http_File) Close() error { return W.WClose() }
func (W _net_http_File) Read(p []byte) (n int, err error) { return W.WRead(p) }
func (W _net_http_File) Readdir(count int) ([]os.FileInfo, error) { return W.WReaddir(count) }
@@ -250,78 +240,57 @@ func (W _net_http_File) Stat() (os.FileInfo, error) { return W.WStat() }
// _net_http_FileSystem is an interface wrapper for FileSystem type
type _net_http_FileSystem struct {
Val interface{}
WOpen func(name string) (http.File, error)
}
func (W _net_http_FileSystem) String() string { return fmt.Sprint(W.Val) }
func (W _net_http_FileSystem) Open(name string) (http.File, error) { return W.WOpen(name) }
// _net_http_Flusher is an interface wrapper for Flusher type
type _net_http_Flusher struct {
Val interface{}
WFlush func()
}
func (W _net_http_Flusher) String() string { return fmt.Sprint(W.Val) }
func (W _net_http_Flusher) Flush() { W.WFlush() }
// _net_http_Handler is an interface wrapper for Handler type
type _net_http_Handler struct {
Val interface{}
WServeHTTP func(a0 http.ResponseWriter, a1 *http.Request)
}
func (W _net_http_Handler) String() string { return fmt.Sprint(W.Val) }
func (W _net_http_Handler) ServeHTTP(a0 http.ResponseWriter, a1 *http.Request) { W.WServeHTTP(a0, a1) }
// _net_http_Hijacker is an interface wrapper for Hijacker type
type _net_http_Hijacker struct {
Val interface{}
WHijack func() (net.Conn, *bufio.ReadWriter, error)
}
func (W _net_http_Hijacker) String() string { return fmt.Sprint(W.Val) }
func (W _net_http_Hijacker) Hijack() (net.Conn, *bufio.ReadWriter, error) { return W.WHijack() }
// _net_http_Pusher is an interface wrapper for Pusher type
type _net_http_Pusher struct {
Val interface{}
WPush func(target string, opts *http.PushOptions) error
}
func (W _net_http_Pusher) String() string { return fmt.Sprint(W.Val) }
func (W _net_http_Pusher) Push(target string, opts *http.PushOptions) error {
return W.WPush(target, opts)
}
// _net_http_ResponseWriter is an interface wrapper for ResponseWriter type
type _net_http_ResponseWriter struct {
Val interface{}
WHeader func() http.Header
WWrite func(a0 []byte) (int, error)
WWriteHeader func(statusCode int)
}
func (W _net_http_ResponseWriter) String() string { return fmt.Sprint(W.Val) }
func (W _net_http_ResponseWriter) Header() http.Header { return W.WHeader() }
func (W _net_http_ResponseWriter) Write(a0 []byte) (int, error) { return W.WWrite(a0) }
func (W _net_http_ResponseWriter) WriteHeader(statusCode int) { W.WWriteHeader(statusCode) }
// _net_http_RoundTripper is an interface wrapper for RoundTripper type
type _net_http_RoundTripper struct {
Val interface{}
WRoundTrip func(a0 *http.Request) (*http.Response, error)
}
func (W _net_http_RoundTripper) String() string { return fmt.Sprint(W.Val) }
func (W _net_http_RoundTripper) RoundTrip(a0 *http.Request) (*http.Response, error) {
return W.WRoundTrip(a0)
}

View File

@@ -26,7 +26,6 @@ func init() {
// _net_http_cookiejar_PublicSuffixList is an interface wrapper for PublicSuffixList type
type _net_http_cookiejar_PublicSuffixList struct {
Val interface{}
WPublicSuffix func(domain string) string
WString func() string
}

View File

@@ -5,7 +5,6 @@
package stdlib
import (
"fmt"
"net/http/httputil"
"reflect"
)
@@ -40,12 +39,9 @@ func init() {
// _net_http_httputil_BufferPool is an interface wrapper for BufferPool type
type _net_http_httputil_BufferPool struct {
Val interface{}
WGet func() []byte
WPut func(a0 []byte)
}
func (W _net_http_httputil_BufferPool) String() string { return fmt.Sprint(W.Val) }
func (W _net_http_httputil_BufferPool) Get() []byte { return W.WGet() }
func (W _net_http_httputil_BufferPool) Put(a0 []byte) { W.WPut(a0) }

View File

@@ -5,7 +5,6 @@
package stdlib
import (
"fmt"
"net/rpc"
"reflect"
)
@@ -49,15 +48,12 @@ func init() {
// _net_rpc_ClientCodec is an interface wrapper for ClientCodec type
type _net_rpc_ClientCodec struct {
Val interface{}
WClose func() error
WReadResponseBody func(a0 interface{}) error
WReadResponseHeader func(a0 *rpc.Response) error
WWriteRequest func(a0 *rpc.Request, a1 interface{}) error
}
func (W _net_rpc_ClientCodec) String() string { return fmt.Sprint(W.Val) }
func (W _net_rpc_ClientCodec) Close() error { return W.WClose() }
func (W _net_rpc_ClientCodec) ReadResponseBody(a0 interface{}) error { return W.WReadResponseBody(a0) }
func (W _net_rpc_ClientCodec) ReadResponseHeader(a0 *rpc.Response) error {
@@ -69,15 +65,12 @@ func (W _net_rpc_ClientCodec) WriteRequest(a0 *rpc.Request, a1 interface{}) erro
// _net_rpc_ServerCodec is an interface wrapper for ServerCodec type
type _net_rpc_ServerCodec struct {
Val interface{}
WClose func() error
WReadRequestBody func(a0 interface{}) error
WReadRequestHeader func(a0 *rpc.Request) error
WWriteResponse func(a0 *rpc.Response, a1 interface{}) error
}
func (W _net_rpc_ServerCodec) String() string { return fmt.Sprint(W.Val) }
func (W _net_rpc_ServerCodec) Close() error { return W.WClose() }
func (W _net_rpc_ServerCodec) ReadRequestBody(a0 interface{}) error { return W.WReadRequestBody(a0) }
func (W _net_rpc_ServerCodec) ReadRequestHeader(a0 *rpc.Request) error {

View File

@@ -5,7 +5,6 @@
package stdlib
import (
"fmt"
"net/smtp"
"reflect"
)
@@ -31,13 +30,10 @@ func init() {
// _net_smtp_Auth is an interface wrapper for Auth type
type _net_smtp_Auth struct {
Val interface{}
WNext func(fromServer []byte, more bool) (toServer []byte, err error)
WStart func(server *smtp.ServerInfo) (proto string, toServer []byte, err error)
}
func (W _net_smtp_Auth) String() string { return fmt.Sprint(W.Val) }
func (W _net_smtp_Auth) Next(fromServer []byte, more bool) (toServer []byte, err error) {
return W.WNext(fromServer, more)
}

View File

@@ -5,7 +5,6 @@
package stdlib
import (
"fmt"
"go/constant"
"go/token"
"os"
@@ -132,7 +131,6 @@ func init() {
// _os_FileInfo is an interface wrapper for FileInfo type
type _os_FileInfo struct {
Val interface{}
WIsDir func() bool
WModTime func() time.Time
WMode func() os.FileMode
@@ -141,8 +139,6 @@ type _os_FileInfo struct {
WSys func() interface{}
}
func (W _os_FileInfo) String() string { return fmt.Sprint(W.Val) }
func (W _os_FileInfo) IsDir() bool { return W.WIsDir() }
func (W _os_FileInfo) ModTime() time.Time { return W.WModTime() }
func (W _os_FileInfo) Mode() os.FileMode { return W.WMode() }
@@ -152,7 +148,6 @@ func (W _os_FileInfo) Sys() interface{} { return W.WSys() }
// _os_Signal is an interface wrapper for Signal type
type _os_Signal struct {
Val interface{}
WSignal func()
WString func() string
}

View File

@@ -91,7 +91,6 @@ func init() {
// _reflect_Type is an interface wrapper for Type type
type _reflect_Type struct {
Val interface{}
WAlign func() int
WAssignableTo func(u reflect.Type) bool
WBits func() int

View File

@@ -5,7 +5,6 @@
package stdlib
import (
"fmt"
"reflect"
"runtime"
)
@@ -69,12 +68,9 @@ func init() {
// _runtime_Error is an interface wrapper for Error type
type _runtime_Error struct {
Val interface{}
WError func() string
WRuntimeError func()
}
func (W _runtime_Error) String() string { return fmt.Sprint(W.Val) }
func (W _runtime_Error) Error() string { return W.WError() }
func (W _runtime_Error) RuntimeError() { W.WRuntimeError() }

View File

@@ -5,7 +5,6 @@
package stdlib
import (
"fmt"
"reflect"
"sort"
)
@@ -44,14 +43,11 @@ func init() {
// _sort_Interface is an interface wrapper for Interface type
type _sort_Interface struct {
Val interface{}
WLen func() int
WLess func(i int, j int) bool
WSwap func(i int, j int)
}
func (W _sort_Interface) String() string { return fmt.Sprint(W.Val) }
func (W _sort_Interface) Len() int { return W.WLen() }
func (W _sort_Interface) Less(i int, j int) bool { return W.WLess(i, j) }
func (W _sort_Interface) Swap(i int, j int) { W.WSwap(i, j) }

View File

@@ -5,7 +5,6 @@
package stdlib
import (
"fmt"
"reflect"
"sync"
)
@@ -32,12 +31,9 @@ func init() {
// _sync_Locker is an interface wrapper for Locker type
type _sync_Locker struct {
Val interface{}
WLock func()
WUnlock func()
}
func (W _sync_Locker) String() string { return fmt.Sprint(W.Val) }
func (W _sync_Locker) Lock() { W.WLock() }
func (W _sync_Locker) Unlock() { W.WUnlock() }

View File

@@ -67,7 +67,6 @@ func init() {
// _text_template_parse_Node is an interface wrapper for Node type
type _text_template_parse_Node struct {
Val interface{}
WCopy func() parse.Node
WPosition func() parse.Pos
WString func() string

View File

@@ -6,7 +6,6 @@ package stdlib
import (
"compress/flate"
"fmt"
"go/constant"
"go/token"
"io"
@@ -43,22 +42,16 @@ func init() {
// _compress_flate_Reader is an interface wrapper for Reader type
type _compress_flate_Reader struct {
Val interface{}
WRead func(p []byte) (n int, err error)
WReadByte func() (byte, error)
}
func (W _compress_flate_Reader) String() string { return fmt.Sprint(W.Val) }
func (W _compress_flate_Reader) Read(p []byte) (n int, err error) { return W.WRead(p) }
func (W _compress_flate_Reader) ReadByte() (byte, error) { return W.WReadByte() }
// _compress_flate_Resetter is an interface wrapper for Resetter type
type _compress_flate_Resetter struct {
Val interface{}
WReset func(r io.Reader, dict []byte) error
}
func (W _compress_flate_Resetter) String() string { return fmt.Sprint(W.Val) }
func (W _compress_flate_Resetter) Reset(r io.Reader, dict []byte) error { return W.WReset(r, dict) }

View File

@@ -6,7 +6,6 @@ package stdlib
import (
"compress/zlib"
"fmt"
"go/constant"
"go/token"
"io"
@@ -41,10 +40,7 @@ func init() {
// _compress_zlib_Resetter is an interface wrapper for Resetter type
type _compress_zlib_Resetter struct {
Val interface{}
WReset func(r io.Reader, dict []byte) error
}
func (W _compress_zlib_Resetter) String() string { return fmt.Sprint(W.Val) }
func (W _compress_zlib_Resetter) Reset(r io.Reader, dict []byte) error { return W.WReset(r, dict) }

View File

@@ -6,7 +6,6 @@ package stdlib
import (
"container/heap"
"fmt"
"reflect"
)
@@ -29,7 +28,6 @@ func init() {
// _container_heap_Interface is an interface wrapper for Interface type
type _container_heap_Interface struct {
Val interface{}
WLen func() int
WLess func(i int, j int) bool
WPop func() interface{}
@@ -37,8 +35,6 @@ type _container_heap_Interface struct {
WSwap func(i int, j int)
}
func (W _container_heap_Interface) String() string { return fmt.Sprint(W.Val) }
func (W _container_heap_Interface) Len() int { return W.WLen() }
func (W _container_heap_Interface) Less(i int, j int) bool { return W.WLess(i, j) }
func (W _container_heap_Interface) Pop() interface{} { return W.WPop() }

View File

@@ -6,7 +6,6 @@ package stdlib
import (
"context"
"fmt"
"reflect"
"time"
)
@@ -34,15 +33,12 @@ func init() {
// _context_Context is an interface wrapper for Context type
type _context_Context struct {
Val interface{}
WDeadline func() (deadline time.Time, ok bool)
WDone func() <-chan struct{}
WErr func() error
WValue func(key interface{}) interface{}
}
func (W _context_Context) String() string { return fmt.Sprint(W.Val) }
func (W _context_Context) Deadline() (deadline time.Time, ok bool) { return W.WDeadline() }
func (W _context_Context) Done() <-chan struct{} { return W.WDone() }
func (W _context_Context) Err() error { return W.WErr() }

View File

@@ -6,7 +6,6 @@ package stdlib
import (
"crypto"
"fmt"
"io"
"reflect"
)
@@ -56,13 +55,10 @@ func init() {
// _crypto_Decrypter is an interface wrapper for Decrypter type
type _crypto_Decrypter struct {
Val interface{}
WDecrypt func(rand io.Reader, msg []byte, opts crypto.DecrypterOpts) (plaintext []byte, err error)
WPublic func() crypto.PublicKey
}
func (W _crypto_Decrypter) String() string { return fmt.Sprint(W.Val) }
func (W _crypto_Decrypter) Decrypt(rand io.Reader, msg []byte, opts crypto.DecrypterOpts) (plaintext []byte, err error) {
return W.WDecrypt(rand, msg, opts)
}
@@ -70,34 +66,22 @@ func (W _crypto_Decrypter) Public() crypto.PublicKey { return W.WPublic() }
// _crypto_DecrypterOpts is an interface wrapper for DecrypterOpts type
type _crypto_DecrypterOpts struct {
Val interface{}
}
func (W _crypto_DecrypterOpts) String() string { return fmt.Sprint(W.Val) }
// _crypto_PrivateKey is an interface wrapper for PrivateKey type
type _crypto_PrivateKey struct {
Val interface{}
}
func (W _crypto_PrivateKey) String() string { return fmt.Sprint(W.Val) }
// _crypto_PublicKey is an interface wrapper for PublicKey type
type _crypto_PublicKey struct {
Val interface{}
}
func (W _crypto_PublicKey) String() string { return fmt.Sprint(W.Val) }
// _crypto_Signer is an interface wrapper for Signer type
type _crypto_Signer struct {
Val interface{}
WPublic func() crypto.PublicKey
WSign func(rand io.Reader, digest []byte, opts crypto.SignerOpts) (signature []byte, err error)
}
func (W _crypto_Signer) String() string { return fmt.Sprint(W.Val) }
func (W _crypto_Signer) Public() crypto.PublicKey { return W.WPublic() }
func (W _crypto_Signer) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) (signature []byte, err error) {
return W.WSign(rand, digest, opts)
@@ -105,10 +89,7 @@ func (W _crypto_Signer) Sign(rand io.Reader, digest []byte, opts crypto.SignerOp
// _crypto_SignerOpts is an interface wrapper for SignerOpts type
type _crypto_SignerOpts struct {
Val interface{}
WHashFunc func() crypto.Hash
}
func (W _crypto_SignerOpts) String() string { return fmt.Sprint(W.Val) }
func (W _crypto_SignerOpts) HashFunc() crypto.Hash { return W.WHashFunc() }

View File

@@ -6,7 +6,6 @@ package stdlib
import (
"crypto/cipher"
"fmt"
"reflect"
)
@@ -41,15 +40,12 @@ func init() {
// _crypto_cipher_AEAD is an interface wrapper for AEAD type
type _crypto_cipher_AEAD struct {
Val interface{}
WNonceSize func() int
WOpen func(dst []byte, nonce []byte, ciphertext []byte, additionalData []byte) ([]byte, error)
WOverhead func() int
WSeal func(dst []byte, nonce []byte, plaintext []byte, additionalData []byte) []byte
}
func (W _crypto_cipher_AEAD) String() string { return fmt.Sprint(W.Val) }
func (W _crypto_cipher_AEAD) NonceSize() int { return W.WNonceSize() }
func (W _crypto_cipher_AEAD) Open(dst []byte, nonce []byte, ciphertext []byte, additionalData []byte) ([]byte, error) {
return W.WOpen(dst, nonce, ciphertext, additionalData)
@@ -61,36 +57,27 @@ func (W _crypto_cipher_AEAD) Seal(dst []byte, nonce []byte, plaintext []byte, ad
// _crypto_cipher_Block is an interface wrapper for Block type
type _crypto_cipher_Block struct {
Val interface{}
WBlockSize func() int
WDecrypt func(dst []byte, src []byte)
WEncrypt func(dst []byte, src []byte)
}
func (W _crypto_cipher_Block) String() string { return fmt.Sprint(W.Val) }
func (W _crypto_cipher_Block) BlockSize() int { return W.WBlockSize() }
func (W _crypto_cipher_Block) Decrypt(dst []byte, src []byte) { W.WDecrypt(dst, src) }
func (W _crypto_cipher_Block) Encrypt(dst []byte, src []byte) { W.WEncrypt(dst, src) }
// _crypto_cipher_BlockMode is an interface wrapper for BlockMode type
type _crypto_cipher_BlockMode struct {
Val interface{}
WBlockSize func() int
WCryptBlocks func(dst []byte, src []byte)
}
func (W _crypto_cipher_BlockMode) String() string { return fmt.Sprint(W.Val) }
func (W _crypto_cipher_BlockMode) BlockSize() int { return W.WBlockSize() }
func (W _crypto_cipher_BlockMode) CryptBlocks(dst []byte, src []byte) { W.WCryptBlocks(dst, src) }
// _crypto_cipher_Stream is an interface wrapper for Stream type
type _crypto_cipher_Stream struct {
Val interface{}
WXORKeyStream func(dst []byte, src []byte)
}
func (W _crypto_cipher_Stream) String() string { return fmt.Sprint(W.Val) }
func (W _crypto_cipher_Stream) XORKeyStream(dst []byte, src []byte) { W.WXORKeyStream(dst, src) }

View File

@@ -6,7 +6,6 @@ package stdlib
import (
"crypto/elliptic"
"fmt"
"math/big"
"reflect"
)
@@ -33,7 +32,6 @@ func init() {
// _crypto_elliptic_Curve is an interface wrapper for Curve type
type _crypto_elliptic_Curve struct {
Val interface{}
WAdd func(x1 *big.Int, y1 *big.Int, x2 *big.Int, y2 *big.Int) (x *big.Int, y *big.Int)
WDouble func(x1 *big.Int, y1 *big.Int) (x *big.Int, y *big.Int)
WIsOnCurve func(x *big.Int, y *big.Int) bool
@@ -42,8 +40,6 @@ type _crypto_elliptic_Curve struct {
WScalarMult func(x1 *big.Int, y1 *big.Int, k []byte) (x *big.Int, y *big.Int)
}
func (W _crypto_elliptic_Curve) String() string { return fmt.Sprint(W.Val) }
func (W _crypto_elliptic_Curve) Add(x1 *big.Int, y1 *big.Int, x2 *big.Int, y2 *big.Int) (x *big.Int, y *big.Int) {
return W.WAdd(x1, y1, x2, y2)
}

View File

@@ -6,7 +6,6 @@ package stdlib
import (
"crypto/tls"
"fmt"
"go/constant"
"go/token"
"reflect"
@@ -108,13 +107,10 @@ func init() {
// _crypto_tls_ClientSessionCache is an interface wrapper for ClientSessionCache type
type _crypto_tls_ClientSessionCache struct {
Val interface{}
WGet func(sessionKey string) (session *tls.ClientSessionState, ok bool)
WPut func(sessionKey string, cs *tls.ClientSessionState)
}
func (W _crypto_tls_ClientSessionCache) String() string { return fmt.Sprint(W.Val) }
func (W _crypto_tls_ClientSessionCache) Get(sessionKey string) (session *tls.ClientSessionState, ok bool) {
return W.WGet(sessionKey)
}

View File

@@ -6,7 +6,6 @@ package stdlib
import (
"database/sql"
"fmt"
"reflect"
)
@@ -61,22 +60,16 @@ func init() {
// _database_sql_Result is an interface wrapper for Result type
type _database_sql_Result struct {
Val interface{}
WLastInsertId func() (int64, error)
WRowsAffected func() (int64, error)
}
func (W _database_sql_Result) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_Result) LastInsertId() (int64, error) { return W.WLastInsertId() }
func (W _database_sql_Result) RowsAffected() (int64, error) { return W.WRowsAffected() }
// _database_sql_Scanner is an interface wrapper for Scanner type
type _database_sql_Scanner struct {
Val interface{}
WScan func(src interface{}) error
}
func (W _database_sql_Scanner) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_Scanner) Scan(src interface{}) error { return W.WScan(src) }

View File

@@ -7,7 +7,6 @@ package stdlib
import (
"context"
"database/sql/driver"
"fmt"
"reflect"
)
@@ -97,26 +96,20 @@ func init() {
// _database_sql_driver_ColumnConverter is an interface wrapper for ColumnConverter type
type _database_sql_driver_ColumnConverter struct {
Val interface{}
WColumnConverter func(idx int) driver.ValueConverter
}
func (W _database_sql_driver_ColumnConverter) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_ColumnConverter) ColumnConverter(idx int) driver.ValueConverter {
return W.WColumnConverter(idx)
}
// _database_sql_driver_Conn is an interface wrapper for Conn type
type _database_sql_driver_Conn struct {
Val interface{}
WBegin func() (driver.Tx, error)
WClose func() error
WPrepare func(query string) (driver.Stmt, error)
}
func (W _database_sql_driver_Conn) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_Conn) Begin() (driver.Tx, error) { return W.WBegin() }
func (W _database_sql_driver_Conn) Close() error { return W.WClose() }
func (W _database_sql_driver_Conn) Prepare(query string) (driver.Stmt, error) {
@@ -125,37 +118,28 @@ func (W _database_sql_driver_Conn) Prepare(query string) (driver.Stmt, error) {
// _database_sql_driver_ConnBeginTx is an interface wrapper for ConnBeginTx type
type _database_sql_driver_ConnBeginTx struct {
Val interface{}
WBeginTx func(ctx context.Context, opts driver.TxOptions) (driver.Tx, error)
}
func (W _database_sql_driver_ConnBeginTx) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_ConnBeginTx) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, error) {
return W.WBeginTx(ctx, opts)
}
// _database_sql_driver_ConnPrepareContext is an interface wrapper for ConnPrepareContext type
type _database_sql_driver_ConnPrepareContext struct {
Val interface{}
WPrepareContext func(ctx context.Context, query string) (driver.Stmt, error)
}
func (W _database_sql_driver_ConnPrepareContext) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_ConnPrepareContext) PrepareContext(ctx context.Context, query string) (driver.Stmt, error) {
return W.WPrepareContext(ctx, query)
}
// _database_sql_driver_Connector is an interface wrapper for Connector type
type _database_sql_driver_Connector struct {
Val interface{}
WConnect func(a0 context.Context) (driver.Conn, error)
WDriver func() driver.Driver
}
func (W _database_sql_driver_Connector) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_Connector) Connect(a0 context.Context) (driver.Conn, error) {
return W.WConnect(a0)
}
@@ -163,135 +147,100 @@ func (W _database_sql_driver_Connector) Driver() driver.Driver { return W.WDrive
// _database_sql_driver_Driver is an interface wrapper for Driver type
type _database_sql_driver_Driver struct {
Val interface{}
WOpen func(name string) (driver.Conn, error)
}
func (W _database_sql_driver_Driver) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_Driver) Open(name string) (driver.Conn, error) { return W.WOpen(name) }
// _database_sql_driver_DriverContext is an interface wrapper for DriverContext type
type _database_sql_driver_DriverContext struct {
Val interface{}
WOpenConnector func(name string) (driver.Connector, error)
}
func (W _database_sql_driver_DriverContext) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_DriverContext) OpenConnector(name string) (driver.Connector, error) {
return W.WOpenConnector(name)
}
// _database_sql_driver_Execer is an interface wrapper for Execer type
type _database_sql_driver_Execer struct {
Val interface{}
WExec func(query string, args []driver.Value) (driver.Result, error)
}
func (W _database_sql_driver_Execer) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_Execer) Exec(query string, args []driver.Value) (driver.Result, error) {
return W.WExec(query, args)
}
// _database_sql_driver_ExecerContext is an interface wrapper for ExecerContext type
type _database_sql_driver_ExecerContext struct {
Val interface{}
WExecContext func(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error)
}
func (W _database_sql_driver_ExecerContext) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_ExecerContext) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error) {
return W.WExecContext(ctx, query, args)
}
// _database_sql_driver_NamedValueChecker is an interface wrapper for NamedValueChecker type
type _database_sql_driver_NamedValueChecker struct {
Val interface{}
WCheckNamedValue func(a0 *driver.NamedValue) error
}
func (W _database_sql_driver_NamedValueChecker) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_NamedValueChecker) CheckNamedValue(a0 *driver.NamedValue) error {
return W.WCheckNamedValue(a0)
}
// _database_sql_driver_Pinger is an interface wrapper for Pinger type
type _database_sql_driver_Pinger struct {
Val interface{}
WPing func(ctx context.Context) error
}
func (W _database_sql_driver_Pinger) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_Pinger) Ping(ctx context.Context) error { return W.WPing(ctx) }
// _database_sql_driver_Queryer is an interface wrapper for Queryer type
type _database_sql_driver_Queryer struct {
Val interface{}
WQuery func(query string, args []driver.Value) (driver.Rows, error)
}
func (W _database_sql_driver_Queryer) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_Queryer) Query(query string, args []driver.Value) (driver.Rows, error) {
return W.WQuery(query, args)
}
// _database_sql_driver_QueryerContext is an interface wrapper for QueryerContext type
type _database_sql_driver_QueryerContext struct {
Val interface{}
WQueryContext func(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error)
}
func (W _database_sql_driver_QueryerContext) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_QueryerContext) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error) {
return W.WQueryContext(ctx, query, args)
}
// _database_sql_driver_Result is an interface wrapper for Result type
type _database_sql_driver_Result struct {
Val interface{}
WLastInsertId func() (int64, error)
WRowsAffected func() (int64, error)
}
func (W _database_sql_driver_Result) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_Result) LastInsertId() (int64, error) { return W.WLastInsertId() }
func (W _database_sql_driver_Result) RowsAffected() (int64, error) { return W.WRowsAffected() }
// _database_sql_driver_Rows is an interface wrapper for Rows type
type _database_sql_driver_Rows struct {
Val interface{}
WClose func() error
WColumns func() []string
WNext func(dest []driver.Value) error
}
func (W _database_sql_driver_Rows) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_Rows) Close() error { return W.WClose() }
func (W _database_sql_driver_Rows) Columns() []string { return W.WColumns() }
func (W _database_sql_driver_Rows) Next(dest []driver.Value) error { return W.WNext(dest) }
// _database_sql_driver_RowsColumnTypeDatabaseTypeName is an interface wrapper for RowsColumnTypeDatabaseTypeName type
type _database_sql_driver_RowsColumnTypeDatabaseTypeName struct {
Val interface{}
WClose func() error
WColumnTypeDatabaseTypeName func(index int) string
WColumns func() []string
WNext func(dest []driver.Value) error
}
func (W _database_sql_driver_RowsColumnTypeDatabaseTypeName) String() string {
return fmt.Sprint(W.Val)
}
func (W _database_sql_driver_RowsColumnTypeDatabaseTypeName) Close() error { return W.WClose() }
func (W _database_sql_driver_RowsColumnTypeDatabaseTypeName) ColumnTypeDatabaseTypeName(index int) string {
return W.WColumnTypeDatabaseTypeName(index)
@@ -303,15 +252,12 @@ func (W _database_sql_driver_RowsColumnTypeDatabaseTypeName) Next(dest []driver.
// _database_sql_driver_RowsColumnTypeLength is an interface wrapper for RowsColumnTypeLength type
type _database_sql_driver_RowsColumnTypeLength struct {
Val interface{}
WClose func() error
WColumnTypeLength func(index int) (length int64, ok bool)
WColumns func() []string
WNext func(dest []driver.Value) error
}
func (W _database_sql_driver_RowsColumnTypeLength) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_RowsColumnTypeLength) Close() error { return W.WClose() }
func (W _database_sql_driver_RowsColumnTypeLength) ColumnTypeLength(index int) (length int64, ok bool) {
return W.WColumnTypeLength(index)
@@ -323,15 +269,12 @@ func (W _database_sql_driver_RowsColumnTypeLength) Next(dest []driver.Value) err
// _database_sql_driver_RowsColumnTypeNullable is an interface wrapper for RowsColumnTypeNullable type
type _database_sql_driver_RowsColumnTypeNullable struct {
Val interface{}
WClose func() error
WColumnTypeNullable func(index int) (nullable bool, ok bool)
WColumns func() []string
WNext func(dest []driver.Value) error
}
func (W _database_sql_driver_RowsColumnTypeNullable) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_RowsColumnTypeNullable) Close() error { return W.WClose() }
func (W _database_sql_driver_RowsColumnTypeNullable) ColumnTypeNullable(index int) (nullable bool, ok bool) {
return W.WColumnTypeNullable(index)
@@ -343,15 +286,12 @@ func (W _database_sql_driver_RowsColumnTypeNullable) Next(dest []driver.Value) e
// _database_sql_driver_RowsColumnTypePrecisionScale is an interface wrapper for RowsColumnTypePrecisionScale type
type _database_sql_driver_RowsColumnTypePrecisionScale struct {
Val interface{}
WClose func() error
WColumnTypePrecisionScale func(index int) (precision int64, scale int64, ok bool)
WColumns func() []string
WNext func(dest []driver.Value) error
}
func (W _database_sql_driver_RowsColumnTypePrecisionScale) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_RowsColumnTypePrecisionScale) Close() error { return W.WClose() }
func (W _database_sql_driver_RowsColumnTypePrecisionScale) ColumnTypePrecisionScale(index int) (precision int64, scale int64, ok bool) {
return W.WColumnTypePrecisionScale(index)
@@ -363,15 +303,12 @@ func (W _database_sql_driver_RowsColumnTypePrecisionScale) Next(dest []driver.Va
// _database_sql_driver_RowsColumnTypeScanType is an interface wrapper for RowsColumnTypeScanType type
type _database_sql_driver_RowsColumnTypeScanType struct {
Val interface{}
WClose func() error
WColumnTypeScanType func(index int) reflect.Type
WColumns func() []string
WNext func(dest []driver.Value) error
}
func (W _database_sql_driver_RowsColumnTypeScanType) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_RowsColumnTypeScanType) Close() error { return W.WClose() }
func (W _database_sql_driver_RowsColumnTypeScanType) ColumnTypeScanType(index int) reflect.Type {
return W.WColumnTypeScanType(index)
@@ -383,7 +320,6 @@ func (W _database_sql_driver_RowsColumnTypeScanType) Next(dest []driver.Value) e
// _database_sql_driver_RowsNextResultSet is an interface wrapper for RowsNextResultSet type
type _database_sql_driver_RowsNextResultSet struct {
Val interface{}
WClose func() error
WColumns func() []string
WHasNextResultSet func() bool
@@ -391,8 +327,6 @@ type _database_sql_driver_RowsNextResultSet struct {
WNextResultSet func() error
}
func (W _database_sql_driver_RowsNextResultSet) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_RowsNextResultSet) Close() error { return W.WClose() }
func (W _database_sql_driver_RowsNextResultSet) Columns() []string { return W.WColumns() }
func (W _database_sql_driver_RowsNextResultSet) HasNextResultSet() bool { return W.WHasNextResultSet() }
@@ -401,27 +335,21 @@ func (W _database_sql_driver_RowsNextResultSet) NextResultSet() error
// _database_sql_driver_SessionResetter is an interface wrapper for SessionResetter type
type _database_sql_driver_SessionResetter struct {
Val interface{}
WResetSession func(ctx context.Context) error
}
func (W _database_sql_driver_SessionResetter) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_SessionResetter) ResetSession(ctx context.Context) error {
return W.WResetSession(ctx)
}
// _database_sql_driver_Stmt is an interface wrapper for Stmt type
type _database_sql_driver_Stmt struct {
Val interface{}
WClose func() error
WExec func(args []driver.Value) (driver.Result, error)
WNumInput func() int
WQuery func(args []driver.Value) (driver.Rows, error)
}
func (W _database_sql_driver_Stmt) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_Stmt) Close() error { return W.WClose() }
func (W _database_sql_driver_Stmt) Exec(args []driver.Value) (driver.Result, error) {
return W.WExec(args)
@@ -433,65 +361,47 @@ func (W _database_sql_driver_Stmt) Query(args []driver.Value) (driver.Rows, erro
// _database_sql_driver_StmtExecContext is an interface wrapper for StmtExecContext type
type _database_sql_driver_StmtExecContext struct {
Val interface{}
WExecContext func(ctx context.Context, args []driver.NamedValue) (driver.Result, error)
}
func (W _database_sql_driver_StmtExecContext) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_StmtExecContext) ExecContext(ctx context.Context, args []driver.NamedValue) (driver.Result, error) {
return W.WExecContext(ctx, args)
}
// _database_sql_driver_StmtQueryContext is an interface wrapper for StmtQueryContext type
type _database_sql_driver_StmtQueryContext struct {
Val interface{}
WQueryContext func(ctx context.Context, args []driver.NamedValue) (driver.Rows, error)
}
func (W _database_sql_driver_StmtQueryContext) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_StmtQueryContext) QueryContext(ctx context.Context, args []driver.NamedValue) (driver.Rows, error) {
return W.WQueryContext(ctx, args)
}
// _database_sql_driver_Tx is an interface wrapper for Tx type
type _database_sql_driver_Tx struct {
Val interface{}
WCommit func() error
WRollback func() error
}
func (W _database_sql_driver_Tx) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_Tx) Commit() error { return W.WCommit() }
func (W _database_sql_driver_Tx) Rollback() error { return W.WRollback() }
// _database_sql_driver_Value is an interface wrapper for Value type
type _database_sql_driver_Value struct {
Val interface{}
}
func (W _database_sql_driver_Value) String() string { return fmt.Sprint(W.Val) }
// _database_sql_driver_ValueConverter is an interface wrapper for ValueConverter type
type _database_sql_driver_ValueConverter struct {
Val interface{}
WConvertValue func(v interface{}) (driver.Value, error)
}
func (W _database_sql_driver_ValueConverter) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_ValueConverter) ConvertValue(v interface{}) (driver.Value, error) {
return W.WConvertValue(v)
}
// _database_sql_driver_Valuer is an interface wrapper for Valuer type
type _database_sql_driver_Valuer struct {
Val interface{}
WValue func() (driver.Value, error)
}
func (W _database_sql_driver_Valuer) String() string { return fmt.Sprint(W.Val) }
func (W _database_sql_driver_Valuer) Value() (driver.Value, error) { return W.WValue() }

View File

@@ -271,7 +271,6 @@ func init() {
// _debug_dwarf_Type is an interface wrapper for Type type
type _debug_dwarf_Type struct {
Val interface{}
WCommon func() *dwarf.CommonType
WSize func() int64
WString func() string

View File

@@ -6,7 +6,6 @@ package stdlib
import (
"debug/macho"
"fmt"
"reflect"
)
@@ -151,10 +150,7 @@ func init() {
// _debug_macho_Load is an interface wrapper for Load type
type _debug_macho_Load struct {
Val interface{}
WRaw func() []byte
}
func (W _debug_macho_Load) String() string { return fmt.Sprint(W.Val) }
func (W _debug_macho_Load) Raw() []byte { return W.WRaw() }

View File

@@ -6,7 +6,6 @@ package stdlib
import (
"encoding"
"fmt"
"reflect"
)
@@ -28,44 +27,32 @@ func init() {
// _encoding_BinaryMarshaler is an interface wrapper for BinaryMarshaler type
type _encoding_BinaryMarshaler struct {
Val interface{}
WMarshalBinary func() (data []byte, err error)
}
func (W _encoding_BinaryMarshaler) String() string { return fmt.Sprint(W.Val) }
func (W _encoding_BinaryMarshaler) MarshalBinary() (data []byte, err error) {
return W.WMarshalBinary()
}
// _encoding_BinaryUnmarshaler is an interface wrapper for BinaryUnmarshaler type
type _encoding_BinaryUnmarshaler struct {
Val interface{}
WUnmarshalBinary func(data []byte) error
}
func (W _encoding_BinaryUnmarshaler) String() string { return fmt.Sprint(W.Val) }
func (W _encoding_BinaryUnmarshaler) UnmarshalBinary(data []byte) error {
return W.WUnmarshalBinary(data)
}
// _encoding_TextMarshaler is an interface wrapper for TextMarshaler type
type _encoding_TextMarshaler struct {
Val interface{}
WMarshalText func() (text []byte, err error)
}
func (W _encoding_TextMarshaler) String() string { return fmt.Sprint(W.Val) }
func (W _encoding_TextMarshaler) MarshalText() (text []byte, err error) { return W.WMarshalText() }
// _encoding_TextUnmarshaler is an interface wrapper for TextUnmarshaler type
type _encoding_TextUnmarshaler struct {
Val interface{}
WUnmarshalText func(text []byte) error
}
func (W _encoding_TextUnmarshaler) String() string { return fmt.Sprint(W.Val) }
func (W _encoding_TextUnmarshaler) UnmarshalText(text []byte) error { return W.WUnmarshalText(text) }

View File

@@ -39,7 +39,6 @@ func init() {
// _encoding_binary_ByteOrder is an interface wrapper for ByteOrder type
type _encoding_binary_ByteOrder struct {
Val interface{}
WPutUint16 func(a0 []byte, a1 uint16)
WPutUint32 func(a0 []byte, a1 uint32)
WPutUint64 func(a0 []byte, a1 uint64)

View File

@@ -6,7 +6,6 @@ package stdlib
import (
"encoding/gob"
"fmt"
"reflect"
)
@@ -33,20 +32,14 @@ func init() {
// _encoding_gob_GobDecoder is an interface wrapper for GobDecoder type
type _encoding_gob_GobDecoder struct {
Val interface{}
WGobDecode func(a0 []byte) error
}
func (W _encoding_gob_GobDecoder) String() string { return fmt.Sprint(W.Val) }
func (W _encoding_gob_GobDecoder) GobDecode(a0 []byte) error { return W.WGobDecode(a0) }
// _encoding_gob_GobEncoder is an interface wrapper for GobEncoder type
type _encoding_gob_GobEncoder struct {
Val interface{}
WGobEncode func() ([]byte, error)
}
func (W _encoding_gob_GobEncoder) String() string { return fmt.Sprint(W.Val) }
func (W _encoding_gob_GobEncoder) GobEncode() ([]byte, error) { return W.WGobEncode() }

View File

@@ -6,7 +6,6 @@ package stdlib
import (
"encoding/json"
"fmt"
"reflect"
)
@@ -50,27 +49,18 @@ func init() {
// _encoding_json_Marshaler is an interface wrapper for Marshaler type
type _encoding_json_Marshaler struct {
Val interface{}
WMarshalJSON func() ([]byte, error)
}
func (W _encoding_json_Marshaler) String() string { return fmt.Sprint(W.Val) }
func (W _encoding_json_Marshaler) MarshalJSON() ([]byte, error) { return W.WMarshalJSON() }
// _encoding_json_Token is an interface wrapper for Token type
type _encoding_json_Token struct {
Val interface{}
}
func (W _encoding_json_Token) String() string { return fmt.Sprint(W.Val) }
// _encoding_json_Unmarshaler is an interface wrapper for Unmarshaler type
type _encoding_json_Unmarshaler struct {
Val interface{}
WUnmarshalJSON func(a0 []byte) error
}
func (W _encoding_json_Unmarshaler) String() string { return fmt.Sprint(W.Val) }
func (W _encoding_json_Unmarshaler) UnmarshalJSON(a0 []byte) error { return W.WUnmarshalJSON(a0) }

View File

@@ -6,7 +6,6 @@ package stdlib
import (
"encoding/xml"
"fmt"
"reflect"
)
@@ -60,65 +59,47 @@ func init() {
// _encoding_xml_Marshaler is an interface wrapper for Marshaler type
type _encoding_xml_Marshaler struct {
Val interface{}
WMarshalXML func(e *xml.Encoder, start xml.StartElement) error
}
func (W _encoding_xml_Marshaler) String() string { return fmt.Sprint(W.Val) }
func (W _encoding_xml_Marshaler) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return W.WMarshalXML(e, start)
}
// _encoding_xml_MarshalerAttr is an interface wrapper for MarshalerAttr type
type _encoding_xml_MarshalerAttr struct {
Val interface{}
WMarshalXMLAttr func(name xml.Name) (xml.Attr, error)
}
func (W _encoding_xml_MarshalerAttr) String() string { return fmt.Sprint(W.Val) }
func (W _encoding_xml_MarshalerAttr) MarshalXMLAttr(name xml.Name) (xml.Attr, error) {
return W.WMarshalXMLAttr(name)
}
// _encoding_xml_Token is an interface wrapper for Token type
type _encoding_xml_Token struct {
Val interface{}
}
func (W _encoding_xml_Token) String() string { return fmt.Sprint(W.Val) }
// _encoding_xml_TokenReader is an interface wrapper for TokenReader type
type _encoding_xml_TokenReader struct {
Val interface{}
WToken func() (xml.Token, error)
}
func (W _encoding_xml_TokenReader) String() string { return fmt.Sprint(W.Val) }
func (W _encoding_xml_TokenReader) Token() (xml.Token, error) { return W.WToken() }
// _encoding_xml_Unmarshaler is an interface wrapper for Unmarshaler type
type _encoding_xml_Unmarshaler struct {
Val interface{}
WUnmarshalXML func(d *xml.Decoder, start xml.StartElement) error
}
func (W _encoding_xml_Unmarshaler) String() string { return fmt.Sprint(W.Val) }
func (W _encoding_xml_Unmarshaler) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
return W.WUnmarshalXML(d, start)
}
// _encoding_xml_UnmarshalerAttr is an interface wrapper for UnmarshalerAttr type
type _encoding_xml_UnmarshalerAttr struct {
Val interface{}
WUnmarshalXMLAttr func(attr xml.Attr) error
}
func (W _encoding_xml_UnmarshalerAttr) String() string { return fmt.Sprint(W.Val) }
func (W _encoding_xml_UnmarshalerAttr) UnmarshalXMLAttr(attr xml.Attr) error {
return W.WUnmarshalXMLAttr(attr)
}

View File

@@ -37,7 +37,6 @@ func init() {
// _expvar_Var is an interface wrapper for Var type
type _expvar_Var struct {
Val interface{}
WString func() string
}

View File

@@ -64,7 +64,6 @@ func init() {
// _flag_Getter is an interface wrapper for Getter type
type _flag_Getter struct {
Val interface{}
WGet func() interface{}
WSet func(a0 string) error
WString func() string
@@ -76,7 +75,6 @@ func (W _flag_Getter) String() string { return W.WString() }
// _flag_Value is an interface wrapper for Value type
type _flag_Value struct {
Val interface{}
WSet func(a0 string) error
WString func() string
}

View File

@@ -52,27 +52,20 @@ func init() {
// _fmt_Formatter is an interface wrapper for Formatter type
type _fmt_Formatter struct {
Val interface{}
WFormat func(f fmt.State, c rune)
}
func (W _fmt_Formatter) String() string { return fmt.Sprint(W.Val) }
func (W _fmt_Formatter) Format(f fmt.State, c rune) { W.WFormat(f, c) }
// _fmt_GoStringer is an interface wrapper for GoStringer type
type _fmt_GoStringer struct {
Val interface{}
WGoString func() string
}
func (W _fmt_GoStringer) String() string { return fmt.Sprint(W.Val) }
func (W _fmt_GoStringer) GoString() string { return W.WGoString() }
// _fmt_ScanState is an interface wrapper for ScanState type
type _fmt_ScanState struct {
Val interface{}
WRead func(buf []byte) (n int, err error)
WReadRune func() (r rune, size int, err error)
WSkipSpace func()
@@ -81,8 +74,6 @@ type _fmt_ScanState struct {
WWidth func() (wid int, ok bool)
}
func (W _fmt_ScanState) String() string { return fmt.Sprint(W.Val) }
func (W _fmt_ScanState) Read(buf []byte) (n int, err error) { return W.WRead(buf) }
func (W _fmt_ScanState) ReadRune() (r rune, size int, err error) { return W.WReadRune() }
func (W _fmt_ScanState) SkipSpace() { W.WSkipSpace() }
@@ -94,25 +85,19 @@ func (W _fmt_ScanState) Width() (wid int, ok bool) { return W.WWidth() }
// _fmt_Scanner is an interface wrapper for Scanner type
type _fmt_Scanner struct {
Val interface{}
WScan func(state fmt.ScanState, verb rune) error
}
func (W _fmt_Scanner) String() string { return fmt.Sprint(W.Val) }
func (W _fmt_Scanner) Scan(state fmt.ScanState, verb rune) error { return W.WScan(state, verb) }
// _fmt_State is an interface wrapper for State type
type _fmt_State struct {
Val interface{}
WFlag func(c int) bool
WPrecision func() (prec int, ok bool)
WWidth func() (wid int, ok bool)
WWrite func(b []byte) (n int, err error)
}
func (W _fmt_State) String() string { return fmt.Sprint(W.Val) }
func (W _fmt_State) Flag(c int) bool { return W.WFlag(c) }
func (W _fmt_State) Precision() (prec int, ok bool) { return W.WPrecision() }
func (W _fmt_State) Width() (wid int, ok bool) { return W.WWidth() }
@@ -120,7 +105,6 @@ func (W _fmt_State) Write(b []byte) (n int, err error) { return W.WWrite(b) }
// _fmt_Stringer is an interface wrapper for Stringer type
type _fmt_Stringer struct {
Val interface{}
WString func() string
}

View File

@@ -5,7 +5,6 @@
package stdlib
import (
"fmt"
"go/ast"
"go/token"
"reflect"
@@ -129,70 +128,52 @@ func init() {
// _go_ast_Decl is an interface wrapper for Decl type
type _go_ast_Decl struct {
Val interface{}
WEnd func() token.Pos
WPos func() token.Pos
}
func (W _go_ast_Decl) String() string { return fmt.Sprint(W.Val) }
func (W _go_ast_Decl) End() token.Pos { return W.WEnd() }
func (W _go_ast_Decl) Pos() token.Pos { return W.WPos() }
// _go_ast_Expr is an interface wrapper for Expr type
type _go_ast_Expr struct {
Val interface{}
WEnd func() token.Pos
WPos func() token.Pos
}
func (W _go_ast_Expr) String() string { return fmt.Sprint(W.Val) }
func (W _go_ast_Expr) End() token.Pos { return W.WEnd() }
func (W _go_ast_Expr) Pos() token.Pos { return W.WPos() }
// _go_ast_Node is an interface wrapper for Node type
type _go_ast_Node struct {
Val interface{}
WEnd func() token.Pos
WPos func() token.Pos
}
func (W _go_ast_Node) String() string { return fmt.Sprint(W.Val) }
func (W _go_ast_Node) End() token.Pos { return W.WEnd() }
func (W _go_ast_Node) Pos() token.Pos { return W.WPos() }
// _go_ast_Spec is an interface wrapper for Spec type
type _go_ast_Spec struct {
Val interface{}
WEnd func() token.Pos
WPos func() token.Pos
}
func (W _go_ast_Spec) String() string { return fmt.Sprint(W.Val) }
func (W _go_ast_Spec) End() token.Pos { return W.WEnd() }
func (W _go_ast_Spec) Pos() token.Pos { return W.WPos() }
// _go_ast_Stmt is an interface wrapper for Stmt type
type _go_ast_Stmt struct {
Val interface{}
WEnd func() token.Pos
WPos func() token.Pos
}
func (W _go_ast_Stmt) String() string { return fmt.Sprint(W.Val) }
func (W _go_ast_Stmt) End() token.Pos { return W.WEnd() }
func (W _go_ast_Stmt) Pos() token.Pos { return W.WPos() }
// _go_ast_Visitor is an interface wrapper for Visitor type
type _go_ast_Visitor struct {
Val interface{}
WVisit func(node ast.Node) (w ast.Visitor)
}
func (W _go_ast_Visitor) String() string { return fmt.Sprint(W.Val) }
func (W _go_ast_Visitor) Visit(node ast.Node) (w ast.Visitor) { return W.WVisit(node) }

View File

@@ -61,7 +61,6 @@ func init() {
// _go_constant_Value is an interface wrapper for Value type
type _go_constant_Value struct {
Val interface{}
WExactString func() string
WKind func() constant.Kind
WString func() string

View File

@@ -5,7 +5,6 @@
package stdlib
import (
"fmt"
"go/token"
"go/types"
"reflect"
@@ -163,23 +162,17 @@ func init() {
// _go_types_Importer is an interface wrapper for Importer type
type _go_types_Importer struct {
Val interface{}
WImport func(path string) (*types.Package, error)
}
func (W _go_types_Importer) String() string { return fmt.Sprint(W.Val) }
func (W _go_types_Importer) Import(path string) (*types.Package, error) { return W.WImport(path) }
// _go_types_ImporterFrom is an interface wrapper for ImporterFrom type
type _go_types_ImporterFrom struct {
Val interface{}
WImport func(path string) (*types.Package, error)
WImportFrom func(path string, dir string, mode types.ImportMode) (*types.Package, error)
}
func (W _go_types_ImporterFrom) String() string { return fmt.Sprint(W.Val) }
func (W _go_types_ImporterFrom) Import(path string) (*types.Package, error) { return W.WImport(path) }
func (W _go_types_ImporterFrom) ImportFrom(path string, dir string, mode types.ImportMode) (*types.Package, error) {
return W.WImportFrom(path, dir, mode)
@@ -187,7 +180,6 @@ func (W _go_types_ImporterFrom) ImportFrom(path string, dir string, mode types.I
// _go_types_Object is an interface wrapper for Object type
type _go_types_Object struct {
Val interface{}
WExported func() bool
WId func() string
WName func() string
@@ -209,21 +201,17 @@ func (W _go_types_Object) Type() types.Type { return W.WType() }
// _go_types_Sizes is an interface wrapper for Sizes type
type _go_types_Sizes struct {
Val interface{}
WAlignof func(T types.Type) int64
WOffsetsof func(fields []*types.Var) []int64
WSizeof func(T types.Type) int64
}
func (W _go_types_Sizes) String() string { return fmt.Sprint(W.Val) }
func (W _go_types_Sizes) Alignof(T types.Type) int64 { return W.WAlignof(T) }
func (W _go_types_Sizes) Offsetsof(fields []*types.Var) []int64 { return W.WOffsetsof(fields) }
func (W _go_types_Sizes) Sizeof(T types.Type) int64 { return W.WSizeof(T) }
// _go_types_Type is an interface wrapper for Type type
type _go_types_Type struct {
Val interface{}
WString func() string
WUnderlying func() types.Type
}

View File

@@ -5,7 +5,6 @@
package stdlib
import (
"fmt"
"hash"
"reflect"
)
@@ -26,7 +25,6 @@ func init() {
// _hash_Hash is an interface wrapper for Hash type
type _hash_Hash struct {
Val interface{}
WBlockSize func() int
WReset func()
WSize func() int
@@ -34,8 +32,6 @@ type _hash_Hash struct {
WWrite func(p []byte) (n int, err error)
}
func (W _hash_Hash) String() string { return fmt.Sprint(W.Val) }
func (W _hash_Hash) BlockSize() int { return W.WBlockSize() }
func (W _hash_Hash) Reset() { W.WReset() }
func (W _hash_Hash) Size() int { return W.WSize() }
@@ -44,7 +40,6 @@ func (W _hash_Hash) Write(p []byte) (n int, err error) { return W.WWrite(p) }
// _hash_Hash32 is an interface wrapper for Hash32 type
type _hash_Hash32 struct {
Val interface{}
WBlockSize func() int
WReset func()
WSize func() int
@@ -53,8 +48,6 @@ type _hash_Hash32 struct {
WWrite func(p []byte) (n int, err error)
}
func (W _hash_Hash32) String() string { return fmt.Sprint(W.Val) }
func (W _hash_Hash32) BlockSize() int { return W.WBlockSize() }
func (W _hash_Hash32) Reset() { W.WReset() }
func (W _hash_Hash32) Size() int { return W.WSize() }
@@ -64,7 +57,6 @@ func (W _hash_Hash32) Write(p []byte) (n int, err error) { return W.WWrite(p) }
// _hash_Hash64 is an interface wrapper for Hash64 type
type _hash_Hash64 struct {
Val interface{}
WBlockSize func() int
WReset func()
WSize func() int
@@ -73,8 +65,6 @@ type _hash_Hash64 struct {
WWrite func(p []byte) (n int, err error)
}
func (W _hash_Hash64) String() string { return fmt.Sprint(W.Val) }
func (W _hash_Hash64) BlockSize() int { return W.WBlockSize() }
func (W _hash_Hash64) Reset() { W.WReset() }
func (W _hash_Hash64) Size() int { return W.WSize() }

View File

@@ -5,7 +5,6 @@
package stdlib
import (
"fmt"
"image"
"image/color"
"reflect"
@@ -75,29 +74,23 @@ func init() {
// _image_Image is an interface wrapper for Image type
type _image_Image struct {
Val interface{}
WAt func(x int, y int) color.Color
WBounds func() image.Rectangle
WColorModel func() color.Model
}
func (W _image_Image) String() string { return fmt.Sprint(W.Val) }
func (W _image_Image) At(x int, y int) color.Color { return W.WAt(x, y) }
func (W _image_Image) Bounds() image.Rectangle { return W.WBounds() }
func (W _image_Image) ColorModel() color.Model { return W.WColorModel() }
// _image_PalettedImage is an interface wrapper for PalettedImage type
type _image_PalettedImage struct {
Val interface{}
WAt func(x int, y int) color.Color
WBounds func() image.Rectangle
WColorIndexAt func(x int, y int) uint8
WColorModel func() color.Model
}
func (W _image_PalettedImage) String() string { return fmt.Sprint(W.Val) }
func (W _image_PalettedImage) At(x int, y int) color.Color { return W.WAt(x, y) }
func (W _image_PalettedImage) Bounds() image.Rectangle { return W.WBounds() }
func (W _image_PalettedImage) ColorIndexAt(x int, y int) uint8 { return W.WColorIndexAt(x, y) }

View File

@@ -5,7 +5,6 @@
package stdlib
import (
"fmt"
"image/color"
"reflect"
)
@@ -58,20 +57,14 @@ func init() {
// _image_color_Color is an interface wrapper for Color type
type _image_color_Color struct {
Val interface{}
WRGBA func() (r uint32, g uint32, b uint32, a uint32)
}
func (W _image_color_Color) String() string { return fmt.Sprint(W.Val) }
func (W _image_color_Color) RGBA() (r uint32, g uint32, b uint32, a uint32) { return W.WRGBA() }
// _image_color_Model is an interface wrapper for Model type
type _image_color_Model struct {
Val interface{}
WConvert func(c color.Color) color.Color
}
func (W _image_color_Model) String() string { return fmt.Sprint(W.Val) }
func (W _image_color_Model) Convert(c color.Color) color.Color { return W.WConvert(c) }

View File

@@ -5,7 +5,6 @@
package stdlib
import (
"fmt"
"image"
"image/color"
"image/draw"
@@ -36,27 +35,21 @@ func init() {
// _image_draw_Drawer is an interface wrapper for Drawer type
type _image_draw_Drawer struct {
Val interface{}
WDraw func(dst draw.Image, r image.Rectangle, src image.Image, sp image.Point)
}
func (W _image_draw_Drawer) String() string { return fmt.Sprint(W.Val) }
func (W _image_draw_Drawer) Draw(dst draw.Image, r image.Rectangle, src image.Image, sp image.Point) {
W.WDraw(dst, r, src, sp)
}
// _image_draw_Image is an interface wrapper for Image type
type _image_draw_Image struct {
Val interface{}
WAt func(x int, y int) color.Color
WBounds func() image.Rectangle
WColorModel func() color.Model
WSet func(x int, y int, c color.Color)
}
func (W _image_draw_Image) String() string { return fmt.Sprint(W.Val) }
func (W _image_draw_Image) At(x int, y int) color.Color { return W.WAt(x, y) }
func (W _image_draw_Image) Bounds() image.Rectangle { return W.WBounds() }
func (W _image_draw_Image) ColorModel() color.Model { return W.WColorModel() }
@@ -64,12 +57,9 @@ func (W _image_draw_Image) Set(x int, y int, c color.Color) { W.WSet(x, y, c) }
// _image_draw_Quantizer is an interface wrapper for Quantizer type
type _image_draw_Quantizer struct {
Val interface{}
WQuantize func(p color.Palette, m image.Image) color.Palette
}
func (W _image_draw_Quantizer) String() string { return fmt.Sprint(W.Val) }
func (W _image_draw_Quantizer) Quantize(p color.Palette, m image.Image) color.Palette {
return W.WQuantize(p, m)
}

View File

@@ -5,7 +5,6 @@
package stdlib
import (
"fmt"
"go/constant"
"go/token"
"image/jpeg"
@@ -33,12 +32,9 @@ func init() {
// _image_jpeg_Reader is an interface wrapper for Reader type
type _image_jpeg_Reader struct {
Val interface{}
WRead func(p []byte) (n int, err error)
WReadByte func() (byte, error)
}
func (W _image_jpeg_Reader) String() string { return fmt.Sprint(W.Val) }
func (W _image_jpeg_Reader) Read(p []byte) (n int, err error) { return W.WRead(p) }
func (W _image_jpeg_Reader) ReadByte() (byte, error) { return W.WReadByte() }

View File

@@ -5,7 +5,6 @@
package stdlib
import (
"fmt"
"image/png"
"reflect"
)
@@ -36,12 +35,9 @@ func init() {
// _image_png_EncoderBufferPool is an interface wrapper for EncoderBufferPool type
type _image_png_EncoderBufferPool struct {
Val interface{}
WGet func() *png.EncoderBuffer
WPut func(a0 *png.EncoderBuffer)
}
func (W _image_png_EncoderBufferPool) String() string { return fmt.Sprint(W.Val) }
func (W _image_png_EncoderBufferPool) Get() *png.EncoderBuffer { return W.WGet() }
func (W _image_png_EncoderBufferPool) Put(a0 *png.EncoderBuffer) { W.WPut(a0) }

View File

@@ -5,7 +5,6 @@
package stdlib
import (
"fmt"
"go/constant"
"go/token"
"io"
@@ -91,94 +90,70 @@ func init() {
// _io_ByteReader is an interface wrapper for ByteReader type
type _io_ByteReader struct {
Val interface{}
WReadByte func() (byte, error)
}
func (W _io_ByteReader) String() string { return fmt.Sprint(W.Val) }
func (W _io_ByteReader) ReadByte() (byte, error) { return W.WReadByte() }
// _io_ByteScanner is an interface wrapper for ByteScanner type
type _io_ByteScanner struct {
Val interface{}
WReadByte func() (byte, error)
WUnreadByte func() error
}
func (W _io_ByteScanner) String() string { return fmt.Sprint(W.Val) }
func (W _io_ByteScanner) ReadByte() (byte, error) { return W.WReadByte() }
func (W _io_ByteScanner) UnreadByte() error { return W.WUnreadByte() }
// _io_ByteWriter is an interface wrapper for ByteWriter type
type _io_ByteWriter struct {
Val interface{}
WWriteByte func(c byte) error
}
func (W _io_ByteWriter) String() string { return fmt.Sprint(W.Val) }
func (W _io_ByteWriter) WriteByte(c byte) error { return W.WWriteByte(c) }
// _io_Closer is an interface wrapper for Closer type
type _io_Closer struct {
Val interface{}
WClose func() error
}
func (W _io_Closer) String() string { return fmt.Sprint(W.Val) }
func (W _io_Closer) Close() error { return W.WClose() }
// _io_ReadCloser is an interface wrapper for ReadCloser type
type _io_ReadCloser struct {
Val interface{}
WClose func() error
WRead func(p []byte) (n int, err error)
}
func (W _io_ReadCloser) String() string { return fmt.Sprint(W.Val) }
func (W _io_ReadCloser) Close() error { return W.WClose() }
func (W _io_ReadCloser) Read(p []byte) (n int, err error) { return W.WRead(p) }
// _io_ReadSeeker is an interface wrapper for ReadSeeker type
type _io_ReadSeeker struct {
Val interface{}
WRead func(p []byte) (n int, err error)
WSeek func(offset int64, whence int) (int64, error)
}
func (W _io_ReadSeeker) String() string { return fmt.Sprint(W.Val) }
func (W _io_ReadSeeker) Read(p []byte) (n int, err error) { return W.WRead(p) }
func (W _io_ReadSeeker) Seek(offset int64, whence int) (int64, error) { return W.WSeek(offset, whence) }
// _io_ReadWriteCloser is an interface wrapper for ReadWriteCloser type
type _io_ReadWriteCloser struct {
Val interface{}
WClose func() error
WRead func(p []byte) (n int, err error)
WWrite func(p []byte) (n int, err error)
}
func (W _io_ReadWriteCloser) String() string { return fmt.Sprint(W.Val) }
func (W _io_ReadWriteCloser) Close() error { return W.WClose() }
func (W _io_ReadWriteCloser) Read(p []byte) (n int, err error) { return W.WRead(p) }
func (W _io_ReadWriteCloser) Write(p []byte) (n int, err error) { return W.WWrite(p) }
// _io_ReadWriteSeeker is an interface wrapper for ReadWriteSeeker type
type _io_ReadWriteSeeker struct {
Val interface{}
WRead func(p []byte) (n int, err error)
WSeek func(offset int64, whence int) (int64, error)
WWrite func(p []byte) (n int, err error)
}
func (W _io_ReadWriteSeeker) String() string { return fmt.Sprint(W.Val) }
func (W _io_ReadWriteSeeker) Read(p []byte) (n int, err error) { return W.WRead(p) }
func (W _io_ReadWriteSeeker) Seek(offset int64, whence int) (int64, error) {
return W.WSeek(offset, whence)
@@ -187,109 +162,79 @@ func (W _io_ReadWriteSeeker) Write(p []byte) (n int, err error) { return W.WWrit
// _io_ReadWriter is an interface wrapper for ReadWriter type
type _io_ReadWriter struct {
Val interface{}
WRead func(p []byte) (n int, err error)
WWrite func(p []byte) (n int, err error)
}
func (W _io_ReadWriter) String() string { return fmt.Sprint(W.Val) }
func (W _io_ReadWriter) Read(p []byte) (n int, err error) { return W.WRead(p) }
func (W _io_ReadWriter) Write(p []byte) (n int, err error) { return W.WWrite(p) }
// _io_Reader is an interface wrapper for Reader type
type _io_Reader struct {
Val interface{}
WRead func(p []byte) (n int, err error)
}
func (W _io_Reader) String() string { return fmt.Sprint(W.Val) }
func (W _io_Reader) Read(p []byte) (n int, err error) { return W.WRead(p) }
// _io_ReaderAt is an interface wrapper for ReaderAt type
type _io_ReaderAt struct {
Val interface{}
WReadAt func(p []byte, off int64) (n int, err error)
}
func (W _io_ReaderAt) String() string { return fmt.Sprint(W.Val) }
func (W _io_ReaderAt) ReadAt(p []byte, off int64) (n int, err error) { return W.WReadAt(p, off) }
// _io_ReaderFrom is an interface wrapper for ReaderFrom type
type _io_ReaderFrom struct {
Val interface{}
WReadFrom func(r io.Reader) (n int64, err error)
}
func (W _io_ReaderFrom) String() string { return fmt.Sprint(W.Val) }
func (W _io_ReaderFrom) ReadFrom(r io.Reader) (n int64, err error) { return W.WReadFrom(r) }
// _io_RuneReader is an interface wrapper for RuneReader type
type _io_RuneReader struct {
Val interface{}
WReadRune func() (r rune, size int, err error)
}
func (W _io_RuneReader) String() string { return fmt.Sprint(W.Val) }
func (W _io_RuneReader) ReadRune() (r rune, size int, err error) { return W.WReadRune() }
// _io_RuneScanner is an interface wrapper for RuneScanner type
type _io_RuneScanner struct {
Val interface{}
WReadRune func() (r rune, size int, err error)
WUnreadRune func() error
}
func (W _io_RuneScanner) String() string { return fmt.Sprint(W.Val) }
func (W _io_RuneScanner) ReadRune() (r rune, size int, err error) { return W.WReadRune() }
func (W _io_RuneScanner) UnreadRune() error { return W.WUnreadRune() }
// _io_Seeker is an interface wrapper for Seeker type
type _io_Seeker struct {
Val interface{}
WSeek func(offset int64, whence int) (int64, error)
}
func (W _io_Seeker) String() string { return fmt.Sprint(W.Val) }
func (W _io_Seeker) Seek(offset int64, whence int) (int64, error) { return W.WSeek(offset, whence) }
// _io_StringWriter is an interface wrapper for StringWriter type
type _io_StringWriter struct {
Val interface{}
WWriteString func(s string) (n int, err error)
}
func (W _io_StringWriter) String() string { return fmt.Sprint(W.Val) }
func (W _io_StringWriter) WriteString(s string) (n int, err error) { return W.WWriteString(s) }
// _io_WriteCloser is an interface wrapper for WriteCloser type
type _io_WriteCloser struct {
Val interface{}
WClose func() error
WWrite func(p []byte) (n int, err error)
}
func (W _io_WriteCloser) String() string { return fmt.Sprint(W.Val) }
func (W _io_WriteCloser) Close() error { return W.WClose() }
func (W _io_WriteCloser) Write(p []byte) (n int, err error) { return W.WWrite(p) }
// _io_WriteSeeker is an interface wrapper for WriteSeeker type
type _io_WriteSeeker struct {
Val interface{}
WSeek func(offset int64, whence int) (int64, error)
WWrite func(p []byte) (n int, err error)
}
func (W _io_WriteSeeker) String() string { return fmt.Sprint(W.Val) }
func (W _io_WriteSeeker) Seek(offset int64, whence int) (int64, error) {
return W.WSeek(offset, whence)
}
@@ -297,30 +242,21 @@ func (W _io_WriteSeeker) Write(p []byte) (n int, err error) { return W.WWrite(p)
// _io_Writer is an interface wrapper for Writer type
type _io_Writer struct {
Val interface{}
WWrite func(p []byte) (n int, err error)
}
func (W _io_Writer) String() string { return fmt.Sprint(W.Val) }
func (W _io_Writer) Write(p []byte) (n int, err error) { return W.WWrite(p) }
// _io_WriterAt is an interface wrapper for WriterAt type
type _io_WriterAt struct {
Val interface{}
WWriteAt func(p []byte, off int64) (n int, err error)
}
func (W _io_WriterAt) String() string { return fmt.Sprint(W.Val) }
func (W _io_WriterAt) WriteAt(p []byte, off int64) (n int, err error) { return W.WWriteAt(p, off) }
// _io_WriterTo is an interface wrapper for WriterTo type
type _io_WriterTo struct {
Val interface{}
WWriteTo func(w io.Writer) (n int64, err error)
}
func (W _io_WriterTo) String() string { return fmt.Sprint(W.Val) }
func (W _io_WriterTo) WriteTo(w io.Writer) (n int64, err error) { return W.WWriteTo(w) }

View File

@@ -5,7 +5,6 @@
package stdlib
import (
"fmt"
"math/rand"
"reflect"
)
@@ -47,26 +46,20 @@ func init() {
// _math_rand_Source is an interface wrapper for Source type
type _math_rand_Source struct {
Val interface{}
WInt63 func() int64
WSeed func(seed int64)
}
func (W _math_rand_Source) String() string { return fmt.Sprint(W.Val) }
func (W _math_rand_Source) Int63() int64 { return W.WInt63() }
func (W _math_rand_Source) Seed(seed int64) { W.WSeed(seed) }
// _math_rand_Source64 is an interface wrapper for Source64 type
type _math_rand_Source64 struct {
Val interface{}
WInt63 func() int64
WSeed func(seed int64)
WUint64 func() uint64
}
func (W _math_rand_Source64) String() string { return fmt.Sprint(W.Val) }
func (W _math_rand_Source64) Int63() int64 { return W.WInt63() }
func (W _math_rand_Source64) Seed(seed int64) { W.WSeed(seed) }
func (W _math_rand_Source64) Uint64() uint64 { return W.WUint64() }

View File

@@ -5,7 +5,6 @@
package stdlib
import (
"fmt"
"mime/multipart"
"reflect"
)
@@ -32,15 +31,12 @@ func init() {
// _mime_multipart_File is an interface wrapper for File type
type _mime_multipart_File struct {
Val interface{}
WClose func() error
WRead func(p []byte) (n int, err error)
WReadAt func(p []byte, off int64) (n int, err error)
WSeek func(offset int64, whence int) (int64, error)
}
func (W _mime_multipart_File) String() string { return fmt.Sprint(W.Val) }
func (W _mime_multipart_File) Close() error { return W.WClose() }
func (W _mime_multipart_File) Read(p []byte) (n int, err error) { return W.WRead(p) }
func (W _mime_multipart_File) ReadAt(p []byte, off int64) (n int, err error) {

View File

@@ -5,7 +5,6 @@
package stdlib
import (
"fmt"
"go/constant"
"go/token"
"net"
@@ -127,7 +126,6 @@ func init() {
// _net_Addr is an interface wrapper for Addr type
type _net_Addr struct {
Val interface{}
WNetwork func() string
WString func() string
}
@@ -137,7 +135,6 @@ func (W _net_Addr) String() string { return W.WString() }
// _net_Conn is an interface wrapper for Conn type
type _net_Conn struct {
Val interface{}
WClose func() error
WLocalAddr func() net.Addr
WRead func(b []byte) (n int, err error)
@@ -148,8 +145,6 @@ type _net_Conn struct {
WWrite func(b []byte) (n int, err error)
}
func (W _net_Conn) String() string { return fmt.Sprint(W.Val) }
func (W _net_Conn) Close() error { return W.WClose() }
func (W _net_Conn) LocalAddr() net.Addr { return W.WLocalAddr() }
func (W _net_Conn) Read(b []byte) (n int, err error) { return W.WRead(b) }
@@ -161,35 +156,28 @@ func (W _net_Conn) Write(b []byte) (n int, err error) { return W.WWrite(b) }
// _net_Error is an interface wrapper for Error type
type _net_Error struct {
Val interface{}
WError func() string
WTemporary func() bool
WTimeout func() bool
}
func (W _net_Error) String() string { return fmt.Sprint(W.Val) }
func (W _net_Error) Error() string { return W.WError() }
func (W _net_Error) Temporary() bool { return W.WTemporary() }
func (W _net_Error) Timeout() bool { return W.WTimeout() }
// _net_Listener is an interface wrapper for Listener type
type _net_Listener struct {
Val interface{}
WAccept func() (net.Conn, error)
WAddr func() net.Addr
WClose func() error
}
func (W _net_Listener) String() string { return fmt.Sprint(W.Val) }
func (W _net_Listener) Accept() (net.Conn, error) { return W.WAccept() }
func (W _net_Listener) Addr() net.Addr { return W.WAddr() }
func (W _net_Listener) Close() error { return W.WClose() }
// _net_PacketConn is an interface wrapper for PacketConn type
type _net_PacketConn struct {
Val interface{}
WClose func() error
WLocalAddr func() net.Addr
WReadFrom func(p []byte) (n int, addr net.Addr, err error)
@@ -199,8 +187,6 @@ type _net_PacketConn struct {
WWriteTo func(p []byte, addr net.Addr) (n int, err error)
}
func (W _net_PacketConn) String() string { return fmt.Sprint(W.Val) }
func (W _net_PacketConn) Close() error { return W.WClose() }
func (W _net_PacketConn) LocalAddr() net.Addr { return W.WLocalAddr() }
func (W _net_PacketConn) ReadFrom(p []byte) (n int, addr net.Addr, err error) { return W.WReadFrom(p) }

View File

@@ -6,7 +6,6 @@ package stdlib
import (
"bufio"
"fmt"
"go/constant"
"go/token"
"net"
@@ -208,23 +207,17 @@ func init() {
// _net_http_CloseNotifier is an interface wrapper for CloseNotifier type
type _net_http_CloseNotifier struct {
Val interface{}
WCloseNotify func() <-chan bool
}
func (W _net_http_CloseNotifier) String() string { return fmt.Sprint(W.Val) }
func (W _net_http_CloseNotifier) CloseNotify() <-chan bool { return W.WCloseNotify() }
// _net_http_CookieJar is an interface wrapper for CookieJar type
type _net_http_CookieJar struct {
Val interface{}
WCookies func(u *url.URL) []*http.Cookie
WSetCookies func(u *url.URL, cookies []*http.Cookie)
}
func (W _net_http_CookieJar) String() string { return fmt.Sprint(W.Val) }
func (W _net_http_CookieJar) Cookies(u *url.URL) []*http.Cookie { return W.WCookies(u) }
func (W _net_http_CookieJar) SetCookies(u *url.URL, cookies []*http.Cookie) {
W.WSetCookies(u, cookies)
@@ -232,7 +225,6 @@ func (W _net_http_CookieJar) SetCookies(u *url.URL, cookies []*http.Cookie) {
// _net_http_File is an interface wrapper for File type
type _net_http_File struct {
Val interface{}
WClose func() error
WRead func(p []byte) (n int, err error)
WReaddir func(count int) ([]os.FileInfo, error)
@@ -240,8 +232,6 @@ type _net_http_File struct {
WStat func() (os.FileInfo, error)
}
func (W _net_http_File) String() string { return fmt.Sprint(W.Val) }
func (W _net_http_File) Close() error { return W.WClose() }
func (W _net_http_File) Read(p []byte) (n int, err error) { return W.WRead(p) }
func (W _net_http_File) Readdir(count int) ([]os.FileInfo, error) { return W.WReaddir(count) }
@@ -250,78 +240,57 @@ func (W _net_http_File) Stat() (os.FileInfo, error) { return W
// _net_http_FileSystem is an interface wrapper for FileSystem type
type _net_http_FileSystem struct {
Val interface{}
WOpen func(name string) (http.File, error)
}
func (W _net_http_FileSystem) String() string { return fmt.Sprint(W.Val) }
func (W _net_http_FileSystem) Open(name string) (http.File, error) { return W.WOpen(name) }
// _net_http_Flusher is an interface wrapper for Flusher type
type _net_http_Flusher struct {
Val interface{}
WFlush func()
}
func (W _net_http_Flusher) String() string { return fmt.Sprint(W.Val) }
func (W _net_http_Flusher) Flush() { W.WFlush() }
// _net_http_Handler is an interface wrapper for Handler type
type _net_http_Handler struct {
Val interface{}
WServeHTTP func(a0 http.ResponseWriter, a1 *http.Request)
}
func (W _net_http_Handler) String() string { return fmt.Sprint(W.Val) }
func (W _net_http_Handler) ServeHTTP(a0 http.ResponseWriter, a1 *http.Request) { W.WServeHTTP(a0, a1) }
// _net_http_Hijacker is an interface wrapper for Hijacker type
type _net_http_Hijacker struct {
Val interface{}
WHijack func() (net.Conn, *bufio.ReadWriter, error)
}
func (W _net_http_Hijacker) String() string { return fmt.Sprint(W.Val) }
func (W _net_http_Hijacker) Hijack() (net.Conn, *bufio.ReadWriter, error) { return W.WHijack() }
// _net_http_Pusher is an interface wrapper for Pusher type
type _net_http_Pusher struct {
Val interface{}
WPush func(target string, opts *http.PushOptions) error
}
func (W _net_http_Pusher) String() string { return fmt.Sprint(W.Val) }
func (W _net_http_Pusher) Push(target string, opts *http.PushOptions) error {
return W.WPush(target, opts)
}
// _net_http_ResponseWriter is an interface wrapper for ResponseWriter type
type _net_http_ResponseWriter struct {
Val interface{}
WHeader func() http.Header
WWrite func(a0 []byte) (int, error)
WWriteHeader func(statusCode int)
}
func (W _net_http_ResponseWriter) String() string { return fmt.Sprint(W.Val) }
func (W _net_http_ResponseWriter) Header() http.Header { return W.WHeader() }
func (W _net_http_ResponseWriter) Write(a0 []byte) (int, error) { return W.WWrite(a0) }
func (W _net_http_ResponseWriter) WriteHeader(statusCode int) { W.WWriteHeader(statusCode) }
// _net_http_RoundTripper is an interface wrapper for RoundTripper type
type _net_http_RoundTripper struct {
Val interface{}
WRoundTrip func(a0 *http.Request) (*http.Response, error)
}
func (W _net_http_RoundTripper) String() string { return fmt.Sprint(W.Val) }
func (W _net_http_RoundTripper) RoundTrip(a0 *http.Request) (*http.Response, error) {
return W.WRoundTrip(a0)
}

View File

@@ -26,7 +26,6 @@ func init() {
// _net_http_cookiejar_PublicSuffixList is an interface wrapper for PublicSuffixList type
type _net_http_cookiejar_PublicSuffixList struct {
Val interface{}
WPublicSuffix func(domain string) string
WString func() string
}

View File

@@ -5,7 +5,6 @@
package stdlib
import (
"fmt"
"net/http/httputil"
"reflect"
)
@@ -40,12 +39,9 @@ func init() {
// _net_http_httputil_BufferPool is an interface wrapper for BufferPool type
type _net_http_httputil_BufferPool struct {
Val interface{}
WGet func() []byte
WPut func(a0 []byte)
}
func (W _net_http_httputil_BufferPool) String() string { return fmt.Sprint(W.Val) }
func (W _net_http_httputil_BufferPool) Get() []byte { return W.WGet() }
func (W _net_http_httputil_BufferPool) Put(a0 []byte) { W.WPut(a0) }

View File

@@ -5,7 +5,6 @@
package stdlib
import (
"fmt"
"net/rpc"
"reflect"
)
@@ -49,15 +48,12 @@ func init() {
// _net_rpc_ClientCodec is an interface wrapper for ClientCodec type
type _net_rpc_ClientCodec struct {
Val interface{}
WClose func() error
WReadResponseBody func(a0 interface{}) error
WReadResponseHeader func(a0 *rpc.Response) error
WWriteRequest func(a0 *rpc.Request, a1 interface{}) error
}
func (W _net_rpc_ClientCodec) String() string { return fmt.Sprint(W.Val) }
func (W _net_rpc_ClientCodec) Close() error { return W.WClose() }
func (W _net_rpc_ClientCodec) ReadResponseBody(a0 interface{}) error { return W.WReadResponseBody(a0) }
func (W _net_rpc_ClientCodec) ReadResponseHeader(a0 *rpc.Response) error {
@@ -69,15 +65,12 @@ func (W _net_rpc_ClientCodec) WriteRequest(a0 *rpc.Request, a1 interface{}) erro
// _net_rpc_ServerCodec is an interface wrapper for ServerCodec type
type _net_rpc_ServerCodec struct {
Val interface{}
WClose func() error
WReadRequestBody func(a0 interface{}) error
WReadRequestHeader func(a0 *rpc.Request) error
WWriteResponse func(a0 *rpc.Response, a1 interface{}) error
}
func (W _net_rpc_ServerCodec) String() string { return fmt.Sprint(W.Val) }
func (W _net_rpc_ServerCodec) Close() error { return W.WClose() }
func (W _net_rpc_ServerCodec) ReadRequestBody(a0 interface{}) error { return W.WReadRequestBody(a0) }
func (W _net_rpc_ServerCodec) ReadRequestHeader(a0 *rpc.Request) error {

View File

@@ -5,7 +5,6 @@
package stdlib
import (
"fmt"
"net/smtp"
"reflect"
)
@@ -31,13 +30,10 @@ func init() {
// _net_smtp_Auth is an interface wrapper for Auth type
type _net_smtp_Auth struct {
Val interface{}
WNext func(fromServer []byte, more bool) (toServer []byte, err error)
WStart func(server *smtp.ServerInfo) (proto string, toServer []byte, err error)
}
func (W _net_smtp_Auth) String() string { return fmt.Sprint(W.Val) }
func (W _net_smtp_Auth) Next(fromServer []byte, more bool) (toServer []byte, err error) {
return W.WNext(fromServer, more)
}

View File

@@ -5,7 +5,6 @@
package stdlib
import (
"fmt"
"go/constant"
"go/token"
"os"
@@ -132,7 +131,6 @@ func init() {
// _os_FileInfo is an interface wrapper for FileInfo type
type _os_FileInfo struct {
Val interface{}
WIsDir func() bool
WModTime func() time.Time
WMode func() os.FileMode
@@ -141,8 +139,6 @@ type _os_FileInfo struct {
WSys func() interface{}
}
func (W _os_FileInfo) String() string { return fmt.Sprint(W.Val) }
func (W _os_FileInfo) IsDir() bool { return W.WIsDir() }
func (W _os_FileInfo) ModTime() time.Time { return W.WModTime() }
func (W _os_FileInfo) Mode() os.FileMode { return W.WMode() }
@@ -152,7 +148,6 @@ func (W _os_FileInfo) Sys() interface{} { return W.WSys() }
// _os_Signal is an interface wrapper for Signal type
type _os_Signal struct {
Val interface{}
WSignal func()
WString func() string
}

View File

@@ -91,7 +91,6 @@ func init() {
// _reflect_Type is an interface wrapper for Type type
type _reflect_Type struct {
Val interface{}
WAlign func() int
WAssignableTo func(u reflect.Type) bool
WBits func() int

Some files were not shown because too many files have changed in this diff Show More