func (f *Flag) Bool(name string) (bool, error) {
	v, err := f.value(name)
	if err != nil {
		return false, err
	}
	return strconv.ParseBool(v)
}
Bool returns a bool if it exists in the set flags.
package configure
import (
	"errors"
	"fmt"
	"os"
	"strconv"
	"strings"
)
func NewFlag() *Flag {
	f := &Flag{
		args:     os.Args,
		defaults: defaultsPrinter,
	}
	return f
}
func NewFlagWithUsage(defaulter func() string) *Flag {
	f := &Flag{
		args:     os.Args,
		defaults: defaulter,
	}
	return f
}
type Flag struct {
	args     []string
	defaults func() string
}
func (f Flag) Setup() error {
	for _, arg := range f.args {
		if arg == "-h" {
			fmt.Fprintf(os.Stderr, f.defaults())
			os.Exit(0)
		}
	}
	return nil
}
func (f Flag) value(name string) (string, error) {
	for _, arg := range f.args {
		ass := strings.TrimPrefix(arg, "--")
		if ass == arg {
			continue
		}
		val := strings.TrimPrefix(ass, fmt.Sprintf("%v=", name))
		if val == ass {
			continue
		}
		return val, nil
	}
	return "", errors.New("could not find that value")
}
func (f Flag) Int(name string) (int, error) {
	v, err := f.value(name)
	if err != nil {
		return 0, err
	}
	i, err := strconv.Atoi(v)
	if err != nil {
		return 0, err
	}
	return i, nil
}