github.com/goplus/gossa@v0.3.25/pkg/archive/zip/go118_export.go (about)

     1  // export by github.com/goplus/gossa/cmd/qexp
     2  
     3  //go:build go1.18
     4  // +build go1.18
     5  
     6  package zip
     7  
     8  import (
     9  	q "archive/zip"
    10  
    11  	"go/constant"
    12  	"reflect"
    13  
    14  	"github.com/goplus/gossa"
    15  )
    16  
    17  func init() {
    18  	gossa.RegisterPackage(&gossa.Package{
    19  		Name: "zip",
    20  		Path: "archive/zip",
    21  		Deps: map[string]string{
    22  			"bufio":           "bufio",
    23  			"compress/flate":  "flate",
    24  			"encoding/binary": "binary",
    25  			"errors":          "errors",
    26  			"hash":            "hash",
    27  			"hash/crc32":      "crc32",
    28  			"io":              "io",
    29  			"io/fs":           "fs",
    30  			"os":              "os",
    31  			"path":            "path",
    32  			"sort":            "sort",
    33  			"strings":         "strings",
    34  			"sync":            "sync",
    35  			"time":            "time",
    36  			"unicode/utf8":    "utf8",
    37  		},
    38  		Interfaces: map[string]reflect.Type{},
    39  		NamedTypes: map[string]gossa.NamedType{
    40  			"Compressor":   {reflect.TypeOf((*q.Compressor)(nil)).Elem(), "", ""},
    41  			"Decompressor": {reflect.TypeOf((*q.Decompressor)(nil)).Elem(), "", ""},
    42  			"File":         {reflect.TypeOf((*q.File)(nil)).Elem(), "", "DataOffset,Open,OpenRaw,findBodyOffset"},
    43  			"FileHeader":   {reflect.TypeOf((*q.FileHeader)(nil)).Elem(), "", "FileInfo,ModTime,Mode,SetModTime,SetMode,hasDataDescriptor,isZip64"},
    44  			"ReadCloser":   {reflect.TypeOf((*q.ReadCloser)(nil)).Elem(), "", "Close"},
    45  			"Reader":       {reflect.TypeOf((*q.Reader)(nil)).Elem(), "", "Open,RegisterDecompressor,decompressor,init,initFileList,openLookup,openReadDir"},
    46  			"Writer":       {reflect.TypeOf((*q.Writer)(nil)).Elem(), "", "Close,Copy,Create,CreateHeader,CreateRaw,Flush,RegisterCompressor,SetComment,SetOffset,compressor,prepare"},
    47  		},
    48  		AliasTypes: map[string]reflect.Type{},
    49  		Vars: map[string]reflect.Value{
    50  			"ErrAlgorithm": reflect.ValueOf(&q.ErrAlgorithm),
    51  			"ErrChecksum":  reflect.ValueOf(&q.ErrChecksum),
    52  			"ErrFormat":    reflect.ValueOf(&q.ErrFormat),
    53  		},
    54  		Funcs: map[string]reflect.Value{
    55  			"FileInfoHeader":       reflect.ValueOf(q.FileInfoHeader),
    56  			"NewReader":            reflect.ValueOf(q.NewReader),
    57  			"NewWriter":            reflect.ValueOf(q.NewWriter),
    58  			"OpenReader":           reflect.ValueOf(q.OpenReader),
    59  			"RegisterCompressor":   reflect.ValueOf(q.RegisterCompressor),
    60  			"RegisterDecompressor": reflect.ValueOf(q.RegisterDecompressor),
    61  		},
    62  		TypedConsts: map[string]gossa.TypedConst{
    63  			"Deflate": {reflect.TypeOf(q.Deflate), constant.MakeInt64(int64(q.Deflate))},
    64  			"Store":   {reflect.TypeOf(q.Store), constant.MakeInt64(int64(q.Store))},
    65  		},
    66  		UntypedConsts: map[string]gossa.UntypedConst{},
    67  	})
    68  }