github.com/goplus/gossa@v0.3.25/pkg/io/go115_export.go (about)

     1  // export by github.com/goplus/gossa/cmd/qexp
     2  
     3  //+build go1.15,!go1.16
     4  
     5  package io
     6  
     7  import (
     8  	q "io"
     9  
    10  	"go/constant"
    11  	"reflect"
    12  
    13  	"github.com/goplus/gossa"
    14  )
    15  
    16  func init() {
    17  	gossa.RegisterPackage(&gossa.Package{
    18  		Name: "io",
    19  		Path: "io",
    20  		Deps: map[string]string{
    21  			"errors": "errors",
    22  			"sync":   "sync",
    23  		},
    24  		Interfaces: map[string]reflect.Type{
    25  			"ByteReader":      reflect.TypeOf((*q.ByteReader)(nil)).Elem(),
    26  			"ByteScanner":     reflect.TypeOf((*q.ByteScanner)(nil)).Elem(),
    27  			"ByteWriter":      reflect.TypeOf((*q.ByteWriter)(nil)).Elem(),
    28  			"Closer":          reflect.TypeOf((*q.Closer)(nil)).Elem(),
    29  			"ReadCloser":      reflect.TypeOf((*q.ReadCloser)(nil)).Elem(),
    30  			"ReadSeeker":      reflect.TypeOf((*q.ReadSeeker)(nil)).Elem(),
    31  			"ReadWriteCloser": reflect.TypeOf((*q.ReadWriteCloser)(nil)).Elem(),
    32  			"ReadWriteSeeker": reflect.TypeOf((*q.ReadWriteSeeker)(nil)).Elem(),
    33  			"ReadWriter":      reflect.TypeOf((*q.ReadWriter)(nil)).Elem(),
    34  			"Reader":          reflect.TypeOf((*q.Reader)(nil)).Elem(),
    35  			"ReaderAt":        reflect.TypeOf((*q.ReaderAt)(nil)).Elem(),
    36  			"ReaderFrom":      reflect.TypeOf((*q.ReaderFrom)(nil)).Elem(),
    37  			"RuneReader":      reflect.TypeOf((*q.RuneReader)(nil)).Elem(),
    38  			"RuneScanner":     reflect.TypeOf((*q.RuneScanner)(nil)).Elem(),
    39  			"Seeker":          reflect.TypeOf((*q.Seeker)(nil)).Elem(),
    40  			"StringWriter":    reflect.TypeOf((*q.StringWriter)(nil)).Elem(),
    41  			"WriteCloser":     reflect.TypeOf((*q.WriteCloser)(nil)).Elem(),
    42  			"WriteSeeker":     reflect.TypeOf((*q.WriteSeeker)(nil)).Elem(),
    43  			"Writer":          reflect.TypeOf((*q.Writer)(nil)).Elem(),
    44  			"WriterAt":        reflect.TypeOf((*q.WriterAt)(nil)).Elem(),
    45  			"WriterTo":        reflect.TypeOf((*q.WriterTo)(nil)).Elem(),
    46  		},
    47  		NamedTypes: map[string]gossa.NamedType{
    48  			"LimitedReader": {reflect.TypeOf((*q.LimitedReader)(nil)).Elem(), "", "Read"},
    49  			"PipeReader":    {reflect.TypeOf((*q.PipeReader)(nil)).Elem(), "", "Close,CloseWithError,Read"},
    50  			"PipeWriter":    {reflect.TypeOf((*q.PipeWriter)(nil)).Elem(), "", "Close,CloseWithError,Write"},
    51  			"SectionReader": {reflect.TypeOf((*q.SectionReader)(nil)).Elem(), "", "Read,ReadAt,Seek,Size"},
    52  		},
    53  		AliasTypes: map[string]reflect.Type{},
    54  		Vars: map[string]reflect.Value{
    55  			"EOF":              reflect.ValueOf(&q.EOF),
    56  			"ErrClosedPipe":    reflect.ValueOf(&q.ErrClosedPipe),
    57  			"ErrNoProgress":    reflect.ValueOf(&q.ErrNoProgress),
    58  			"ErrShortBuffer":   reflect.ValueOf(&q.ErrShortBuffer),
    59  			"ErrShortWrite":    reflect.ValueOf(&q.ErrShortWrite),
    60  			"ErrUnexpectedEOF": reflect.ValueOf(&q.ErrUnexpectedEOF),
    61  		},
    62  		Funcs: map[string]reflect.Value{
    63  			"Copy":             reflect.ValueOf(q.Copy),
    64  			"CopyBuffer":       reflect.ValueOf(q.CopyBuffer),
    65  			"CopyN":            reflect.ValueOf(q.CopyN),
    66  			"LimitReader":      reflect.ValueOf(q.LimitReader),
    67  			"MultiReader":      reflect.ValueOf(q.MultiReader),
    68  			"MultiWriter":      reflect.ValueOf(q.MultiWriter),
    69  			"NewSectionReader": reflect.ValueOf(q.NewSectionReader),
    70  			"Pipe":             reflect.ValueOf(q.Pipe),
    71  			"ReadAtLeast":      reflect.ValueOf(q.ReadAtLeast),
    72  			"ReadFull":         reflect.ValueOf(q.ReadFull),
    73  			"TeeReader":        reflect.ValueOf(q.TeeReader),
    74  			"WriteString":      reflect.ValueOf(q.WriteString),
    75  		},
    76  		TypedConsts: map[string]gossa.TypedConst{},
    77  		UntypedConsts: map[string]gossa.UntypedConst{
    78  			"SeekCurrent": {"untyped int", constant.MakeInt64(int64(q.SeekCurrent))},
    79  			"SeekEnd":     {"untyped int", constant.MakeInt64(int64(q.SeekEnd))},
    80  			"SeekStart":   {"untyped int", constant.MakeInt64(int64(q.SeekStart))},
    81  		},
    82  	})
    83  }