func Parse(args []string, element interface{}) (map[string]string, error) {
	f := flagSet{
		flagTypes: getFlagTypes(element),
		args:      args,
		values:    make(map[string]string),
		keys:      make(map[string]string),
	}
	for {
		seen, err := f.parseOne()
		if seen {
			continue
		}
		if err == nil {
			break
		}
		return nil, err
	}
	return f.values, nil
}
Parse parses the command-line flag arguments into a map,
using the type information in element to discriminate whether a flag is supposed to be a bool,
and other such ambiguities.
package flag
import (
	"fmt"
	"reflect"
	"regexp"
	"strings"
	"github.com/traefik/paerser/parser"
)