github.com/goplus/gossa@v0.3.25/pkg/image/jpeg/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 jpeg
     7  
     8  import (
     9  	q "image/jpeg"
    10  
    11  	"go/constant"
    12  	"reflect"
    13  
    14  	"github.com/goplus/gossa"
    15  )
    16  
    17  func init() {
    18  	gossa.RegisterPackage(&gossa.Package{
    19  		Name: "jpeg",
    20  		Path: "image/jpeg",
    21  		Deps: map[string]string{
    22  			"bufio":                    "bufio",
    23  			"errors":                   "errors",
    24  			"image":                    "image",
    25  			"image/color":              "color",
    26  			"image/internal/imageutil": "imageutil",
    27  			"io":                       "io",
    28  		},
    29  		Interfaces: map[string]reflect.Type{
    30  			"Reader": reflect.TypeOf((*q.Reader)(nil)).Elem(),
    31  		},
    32  		NamedTypes: map[string]gossa.NamedType{
    33  			"FormatError":      {reflect.TypeOf((*q.FormatError)(nil)).Elem(), "Error", ""},
    34  			"Options":          {reflect.TypeOf((*q.Options)(nil)).Elem(), "", ""},
    35  			"UnsupportedError": {reflect.TypeOf((*q.UnsupportedError)(nil)).Elem(), "Error", ""},
    36  		},
    37  		AliasTypes: map[string]reflect.Type{},
    38  		Vars:       map[string]reflect.Value{},
    39  		Funcs: map[string]reflect.Value{
    40  			"Decode":       reflect.ValueOf(q.Decode),
    41  			"DecodeConfig": reflect.ValueOf(q.DecodeConfig),
    42  			"Encode":       reflect.ValueOf(q.Encode),
    43  		},
    44  		TypedConsts: map[string]gossa.TypedConst{},
    45  		UntypedConsts: map[string]gossa.UntypedConst{
    46  			"DefaultQuality": {"untyped int", constant.MakeInt64(int64(q.DefaultQuality))},
    47  		},
    48  	})
    49  }