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

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