import ( "net" "github.com/spf13/pflag" ) func main() { fs := pflag.NewFlagSet("myapp", pflag.ExitOnError) var address net.IP fs.IPVar(&address, "address", net.IPv4(127, 0, 0, 1), "the address to use") fs.Parse(os.Args[1:]) // use the "address" variable here... }In this example, the `fs.IPVar` method is used to declare the "address" flag as an IP address type, with a default value of 127.0.0.1. The `fs.Parse` method is used to parse the command-line flags and set the value of the `address` variable. Overall, this package provides a convenient way to handle command-line flags in Go programs, with support for different types of flags and default values.