github.com/goplus/gossa@v0.3.25/pkg/expvar/go114_export.go (about)

     1  // export by github.com/goplus/gossa/cmd/qexp
     2  
     3  //+build go1.14,!go1.15
     4  
     5  package expvar
     6  
     7  import (
     8  	q "expvar"
     9  
    10  	"reflect"
    11  
    12  	"github.com/goplus/gossa"
    13  )
    14  
    15  func init() {
    16  	gossa.RegisterPackage(&gossa.Package{
    17  		Name: "expvar",
    18  		Path: "expvar",
    19  		Deps: map[string]string{
    20  			"encoding/json": "json",
    21  			"fmt":           "fmt",
    22  			"log":           "log",
    23  			"math":          "math",
    24  			"net/http":      "http",
    25  			"os":            "os",
    26  			"runtime":       "runtime",
    27  			"sort":          "sort",
    28  			"strconv":       "strconv",
    29  			"strings":       "strings",
    30  			"sync":          "sync",
    31  			"sync/atomic":   "atomic",
    32  		},
    33  		Interfaces: map[string]reflect.Type{
    34  			"Var": reflect.TypeOf((*q.Var)(nil)).Elem(),
    35  		},
    36  		NamedTypes: map[string]gossa.NamedType{
    37  			"Float":    {reflect.TypeOf((*q.Float)(nil)).Elem(), "", "Add,Set,String,Value"},
    38  			"Func":     {reflect.TypeOf((*q.Func)(nil)).Elem(), "String,Value", ""},
    39  			"Int":      {reflect.TypeOf((*q.Int)(nil)).Elem(), "", "Add,Set,String,Value"},
    40  			"KeyValue": {reflect.TypeOf((*q.KeyValue)(nil)).Elem(), "", ""},
    41  			"Map":      {reflect.TypeOf((*q.Map)(nil)).Elem(), "", "Add,AddFloat,Delete,Do,Get,Init,Set,String,addKey"},
    42  			"String":   {reflect.TypeOf((*q.String)(nil)).Elem(), "", "Set,String,Value"},
    43  		},
    44  		AliasTypes: map[string]reflect.Type{},
    45  		Vars:       map[string]reflect.Value{},
    46  		Funcs: map[string]reflect.Value{
    47  			"Do":        reflect.ValueOf(q.Do),
    48  			"Get":       reflect.ValueOf(q.Get),
    49  			"Handler":   reflect.ValueOf(q.Handler),
    50  			"NewFloat":  reflect.ValueOf(q.NewFloat),
    51  			"NewInt":    reflect.ValueOf(q.NewInt),
    52  			"NewMap":    reflect.ValueOf(q.NewMap),
    53  			"NewString": reflect.ValueOf(q.NewString),
    54  			"Publish":   reflect.ValueOf(q.Publish),
    55  		},
    56  		TypedConsts:   map[string]gossa.TypedConst{},
    57  		UntypedConsts: map[string]gossa.UntypedConst{},
    58  	})
    59  }