github.com/goplus/igop@v0.25.0/pkg/flag/go117_export.go (about)

     1  // export by github.com/goplus/igop/cmd/qexp
     2  
     3  //go:build go1.17 && !go1.18
     4  // +build go1.17,!go1.18
     5  
     6  package flag
     7  
     8  import (
     9  	q "flag"
    10  
    11  	"go/constant"
    12  	"reflect"
    13  
    14  	"github.com/goplus/igop"
    15  )
    16  
    17  func init() {
    18  	igop.RegisterPackage(&igop.Package{
    19  		Name: "flag",
    20  		Path: "flag",
    21  		Deps: map[string]string{
    22  			"errors":  "errors",
    23  			"fmt":     "fmt",
    24  			"io":      "io",
    25  			"os":      "os",
    26  			"reflect": "reflect",
    27  			"sort":    "sort",
    28  			"strconv": "strconv",
    29  			"strings": "strings",
    30  			"time":    "time",
    31  		},
    32  		Interfaces: map[string]reflect.Type{
    33  			"Getter": reflect.TypeOf((*q.Getter)(nil)).Elem(),
    34  			"Value":  reflect.TypeOf((*q.Value)(nil)).Elem(),
    35  		},
    36  		NamedTypes: map[string]reflect.Type{
    37  			"ErrorHandling": reflect.TypeOf((*q.ErrorHandling)(nil)).Elem(),
    38  			"Flag":          reflect.TypeOf((*q.Flag)(nil)).Elem(),
    39  			"FlagSet":       reflect.TypeOf((*q.FlagSet)(nil)).Elem(),
    40  		},
    41  		AliasTypes: map[string]reflect.Type{},
    42  		Vars: map[string]reflect.Value{
    43  			"CommandLine": reflect.ValueOf(&q.CommandLine),
    44  			"ErrHelp":     reflect.ValueOf(&q.ErrHelp),
    45  			"Usage":       reflect.ValueOf(&q.Usage),
    46  		},
    47  		Funcs: map[string]reflect.Value{
    48  			"Arg":           reflect.ValueOf(q.Arg),
    49  			"Args":          reflect.ValueOf(q.Args),
    50  			"Bool":          reflect.ValueOf(q.Bool),
    51  			"BoolVar":       reflect.ValueOf(q.BoolVar),
    52  			"Duration":      reflect.ValueOf(q.Duration),
    53  			"DurationVar":   reflect.ValueOf(q.DurationVar),
    54  			"Float64":       reflect.ValueOf(q.Float64),
    55  			"Float64Var":    reflect.ValueOf(q.Float64Var),
    56  			"Func":          reflect.ValueOf(q.Func),
    57  			"Int":           reflect.ValueOf(q.Int),
    58  			"Int64":         reflect.ValueOf(q.Int64),
    59  			"Int64Var":      reflect.ValueOf(q.Int64Var),
    60  			"IntVar":        reflect.ValueOf(q.IntVar),
    61  			"Lookup":        reflect.ValueOf(q.Lookup),
    62  			"NArg":          reflect.ValueOf(q.NArg),
    63  			"NFlag":         reflect.ValueOf(q.NFlag),
    64  			"NewFlagSet":    reflect.ValueOf(q.NewFlagSet),
    65  			"Parse":         reflect.ValueOf(q.Parse),
    66  			"Parsed":        reflect.ValueOf(q.Parsed),
    67  			"PrintDefaults": reflect.ValueOf(q.PrintDefaults),
    68  			"Set":           reflect.ValueOf(q.Set),
    69  			"String":        reflect.ValueOf(q.String),
    70  			"StringVar":     reflect.ValueOf(q.StringVar),
    71  			"Uint":          reflect.ValueOf(q.Uint),
    72  			"Uint64":        reflect.ValueOf(q.Uint64),
    73  			"Uint64Var":     reflect.ValueOf(q.Uint64Var),
    74  			"UintVar":       reflect.ValueOf(q.UintVar),
    75  			"UnquoteUsage":  reflect.ValueOf(q.UnquoteUsage),
    76  			"Var":           reflect.ValueOf(q.Var),
    77  			"Visit":         reflect.ValueOf(q.Visit),
    78  			"VisitAll":      reflect.ValueOf(q.VisitAll),
    79  		},
    80  		TypedConsts: map[string]igop.TypedConst{
    81  			"ContinueOnError": {reflect.TypeOf(q.ContinueOnError), constant.MakeInt64(int64(q.ContinueOnError))},
    82  			"ExitOnError":     {reflect.TypeOf(q.ExitOnError), constant.MakeInt64(int64(q.ExitOnError))},
    83  			"PanicOnError":    {reflect.TypeOf(q.PanicOnError), constant.MakeInt64(int64(q.PanicOnError))},
    84  		},
    85  		UntypedConsts: map[string]igop.UntypedConst{},
    86  	})
    87  }