package pflag

import 

// -- int Value
type intValue int

func newIntValue( int,  *int) *intValue {
	* = 
	return (*intValue)()
}

func ( *intValue) ( string) error {
	,  := strconv.ParseInt(, 0, 64)
	* = intValue()
	return 
}

func ( *intValue) () string {
	return "int"
}

func ( *intValue) () string { return strconv.Itoa(int(*)) }

func intConv( string) (interface{}, error) {
	return strconv.Atoi()
}

// GetInt return the int value of a flag with the given name
func ( *FlagSet) ( string) (int, error) {
	,  := .getFlagType(, "int", intConv)
	if  != nil {
		return 0, 
	}
	return .(int), nil
}

// IntVar defines an int flag with specified name, default value, and usage string.
// The argument p points to an int variable in which to store the value of the flag.
func ( *FlagSet) ( *int,  string,  int,  string) {
	.VarP(newIntValue(, ), , "", )
}

// IntVarP is like IntVar, but accepts a shorthand letter that can be used after a single dash.
func ( *FlagSet) ( *int, ,  string,  int,  string) {
	.VarP(newIntValue(, ), , , )
}

// IntVar defines an int flag with specified name, default value, and usage string.
// The argument p points to an int variable in which to store the value of the flag.
func ( *int,  string,  int,  string) {
	CommandLine.VarP(newIntValue(, ), , "", )
}

// IntVarP is like IntVar, but accepts a shorthand letter that can be used after a single dash.
func ( *int, ,  string,  int,  string) {
	CommandLine.VarP(newIntValue(, ), , , )
}

// Int defines an int flag with specified name, default value, and usage string.
// The return value is the address of an int variable that stores the value of the flag.
func ( *FlagSet) ( string,  int,  string) *int {
	 := new(int)
	.IntVarP(, , "", , )
	return 
}

// IntP is like Int, but accepts a shorthand letter that can be used after a single dash.
func ( *FlagSet) (,  string,  int,  string) *int {
	 := new(int)
	.IntVarP(, , , , )
	return 
}

// Int defines an int flag with specified name, default value, and usage string.
// The return value is the address of an int variable that stores the value of the flag.
func ( string,  int,  string) *int {
	return CommandLine.IntP(, "", , )
}

// IntP is like Int, but accepts a shorthand letter that can be used after a single dash.
func (,  string,  int,  string) *int {
	return CommandLine.IntP(, , , )
}