// flagSetToSlice converts pflag.FlagSet to slices for iteration
// It also combines two flagsets.
flagSetToSlice converts pflag.FlagSet to slices for iteration
It also combines two flagsets.
// flagSetToSlice converts pflag . FlagSet to slices for iteration // It also combines two flagsets .
func flagSetToSlice(fl *pflag.FlagSet, fl2 *pflag.FlagSet) []flagType {
	var out []flagType
	fl.VisitAll(func(f *pflag.Flag) {
		if f.Name != "help" {
			out = append(out, flagType{
				Flag: f,
				Type: f.Value.Type(),
			})
		}
	})
	fl2.VisitAll(func(f *pflag.Flag) {
		if f.Name != "help" {
			out = append(out, flagType{
				Flag: f,
				Type: f.Value.Type(),
			})
		}
	})
	return out
}
func flagSetToSlice ( fl * pflag . FlagSet , fl2 * pflag . FlagSet ) [ ] flagType { var out [ ] flagType fl . VisitAll ( func ( f * pflag . Flag ) { if f . Name != " " { out = append ( out , flagType { Flag : f , Type : f . Value . Type ( ) , } ) } } ) fl2 . VisitAll ( func ( f * pflag . Flag ) { if f . Name != " " { out = append ( out , flagType { Flag : f , Type : f . Value . Type ( ) , } ) } } ) return out }
flagSetToSlice converts pflag.FlagSet to slices for iteration
It also combines two flagsets.
flagSetToSlice converts pflag . FlagSet to slices for iteration It also combines two flagsets .