func NewFlagSet(flag Flag) *FlagSet {
	if flag.Names == "" {
		flag.Names = filepath.Base(os.Args[0])
	}
	return newFlagSet(flag)
}
NewFlagSet create a new flagset
package flag
import (
	"bytes"
	"fmt"
	"os"
	"path/filepath"
	"text/tabwriter"
)
type Flag struct {
	Names     string       
	Arglist   string       
	Usage     string       
	Desc      string       
	descLines []string     
	Ptr       interface{}  
	Default interface{}  
	Selects interface{}  
	Env     string       
	ValSep  string       
	Version      string     
	versionLines []string   
	ArgsPtr      *[]string  
	ArgsAnywhere bool       
}
type Metadata interface {
	Metadata() map[string]Flag
}
type NoFlag interface {
	NoFlag()
}
type ErrorHandling uint8
const (
	ErrPanic ErrorHandling = 1 << iota
	ErrPrint
	ErrExit
	DefaultErrorHandling = ErrPrint | ErrExit
)
func (e ErrorHandling) do(eh ErrorHandling) bool {
	return e&eh != 0
}
func (e ErrorHandling) handle(err error) error {
	if err == nil {
		return nil
	}
	if e.do(ErrPanic) {
		panic(err)
	}
	if e.do(ErrPrint) {
		fmt.Fprintln(os.Stderr, err)
	}
	if e.do(ErrExit) {
		os.Exit(2)
	}
	return err
}
type FlagSet struct {
	self Flag
	flags       []Flag
	flagIndexes map[string]int
	subsets       []FlagSet
	subsetIndexes map[string]int
	errorHandling   ErrorHandling
	noHelpFlag      bool
	helpFlagDefined bool
}