github.com/goplus/gossa@v0.3.25/pkg/go/printer/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 printer
     7  
     8  import (
     9  	q "go/printer"
    10  
    11  	"go/constant"
    12  	"reflect"
    13  
    14  	"github.com/goplus/gossa"
    15  )
    16  
    17  func init() {
    18  	gossa.RegisterPackage(&gossa.Package{
    19  		Name: "printer",
    20  		Path: "go/printer",
    21  		Deps: map[string]string{
    22  			"bytes":               "bytes",
    23  			"fmt":                 "fmt",
    24  			"go/ast":              "ast",
    25  			"go/build/constraint": "constraint",
    26  			"go/token":            "token",
    27  			"io":                  "io",
    28  			"math":                "math",
    29  			"os":                  "os",
    30  			"sort":                "sort",
    31  			"strconv":             "strconv",
    32  			"strings":             "strings",
    33  			"text/tabwriter":      "tabwriter",
    34  			"unicode":             "unicode",
    35  			"unicode/utf8":        "utf8",
    36  		},
    37  		Interfaces: map[string]reflect.Type{},
    38  		NamedTypes: map[string]gossa.NamedType{
    39  			"CommentedNode": {reflect.TypeOf((*q.CommentedNode)(nil)).Elem(), "", ""},
    40  			"Config":        {reflect.TypeOf((*q.Config)(nil)).Elem(), "", "Fprint,fprint"},
    41  			"Mode":          {reflect.TypeOf((*q.Mode)(nil)).Elem(), "", ""},
    42  		},
    43  		AliasTypes: map[string]reflect.Type{},
    44  		Vars:       map[string]reflect.Value{},
    45  		Funcs: map[string]reflect.Value{
    46  			"Fprint": reflect.ValueOf(q.Fprint),
    47  		},
    48  		TypedConsts: map[string]gossa.TypedConst{
    49  			"RawFormat": {reflect.TypeOf(q.RawFormat), constant.MakeInt64(int64(q.RawFormat))},
    50  			"SourcePos": {reflect.TypeOf(q.SourcePos), constant.MakeInt64(int64(q.SourcePos))},
    51  			"TabIndent": {reflect.TypeOf(q.TabIndent), constant.MakeInt64(int64(q.TabIndent))},
    52  			"UseSpaces": {reflect.TypeOf(q.UseSpaces), constant.MakeInt64(int64(q.UseSpaces))},
    53  		},
    54  		UntypedConsts: map[string]gossa.UntypedConst{},
    55  	})
    56  }