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

     1  // export by github.com/goplus/gossa/cmd/qexp
     2  
     3  //+build go1.15,!go1.16
     4  
     5  package flate
     6  
     7  import (
     8  	q "compress/flate"
     9  
    10  	"go/constant"
    11  	"reflect"
    12  
    13  	"github.com/goplus/gossa"
    14  )
    15  
    16  func init() {
    17  	gossa.RegisterPackage(&gossa.Package{
    18  		Name: "flate",
    19  		Path: "compress/flate",
    20  		Deps: map[string]string{
    21  			"bufio":     "bufio",
    22  			"fmt":       "fmt",
    23  			"io":        "io",
    24  			"math":      "math",
    25  			"math/bits": "bits",
    26  			"sort":      "sort",
    27  			"strconv":   "strconv",
    28  			"sync":      "sync",
    29  		},
    30  		Interfaces: map[string]reflect.Type{
    31  			"Reader":   reflect.TypeOf((*q.Reader)(nil)).Elem(),
    32  			"Resetter": reflect.TypeOf((*q.Resetter)(nil)).Elem(),
    33  		},
    34  		NamedTypes: map[string]gossa.NamedType{
    35  			"CorruptInputError": {reflect.TypeOf((*q.CorruptInputError)(nil)).Elem(), "Error", ""},
    36  			"InternalError":     {reflect.TypeOf((*q.InternalError)(nil)).Elem(), "Error", ""},
    37  			"ReadError":         {reflect.TypeOf((*q.ReadError)(nil)).Elem(), "", "Error"},
    38  			"WriteError":        {reflect.TypeOf((*q.WriteError)(nil)).Elem(), "", "Error"},
    39  			"Writer":            {reflect.TypeOf((*q.Writer)(nil)).Elem(), "", "Close,Flush,Reset,Write"},
    40  		},
    41  		AliasTypes: map[string]reflect.Type{},
    42  		Vars:       map[string]reflect.Value{},
    43  		Funcs: map[string]reflect.Value{
    44  			"NewReader":     reflect.ValueOf(q.NewReader),
    45  			"NewReaderDict": reflect.ValueOf(q.NewReaderDict),
    46  			"NewWriter":     reflect.ValueOf(q.NewWriter),
    47  			"NewWriterDict": reflect.ValueOf(q.NewWriterDict),
    48  		},
    49  		TypedConsts: map[string]gossa.TypedConst{},
    50  		UntypedConsts: map[string]gossa.UntypedConst{
    51  			"BestCompression":    {"untyped int", constant.MakeInt64(int64(q.BestCompression))},
    52  			"BestSpeed":          {"untyped int", constant.MakeInt64(int64(q.BestSpeed))},
    53  			"DefaultCompression": {"untyped int", constant.MakeInt64(int64(q.DefaultCompression))},
    54  			"HuffmanOnly":        {"untyped int", constant.MakeInt64(int64(q.HuffmanOnly))},
    55  			"NoCompression":      {"untyped int", constant.MakeInt64(int64(q.NoCompression))},
    56  		},
    57  	})
    58  }