code: func Flags(flags Flagger, main interface{}) error {
  	typ := reflect.TypeOf(main)
  	if typ.Kind() != reflect.Ptr {
  		return fmt.Errorf("value must be pointer to struct, but is %s", typ.Kind())
  	}
  
  	mainVal := reflect.ValueOf(main).Elem()
  	mainTyp := mainVal.Type()
  	if mainTyp.Kind() != reflect.Struct {
  		return fmt.Errorf("value must be pointer to struct, but is pointer to %s", typ.Kind())
  	}
  
  	return setFlags(newFlagTracker(flags), main, "")
  }
docs: // Flags sets up the given Flagger (usually an instance of flag.FlagSet or
  // pflag.FlagSet). The second argument, "main", must be a pointer to a struct. A
  // flag will be created for each exported field of the struct which isn't
  // explicitly ignored.
  //
  // Struct tags are used to control the behavior of Flags(), though none are
  // necessary.
  //
  // 1. The "help" tag on a field is used to populate the usage string for that
  // field's flag.
  //
  // 2. The "flag" tag on a field will be used as the name of that field's flag.
  // Set it to "-" to ignore this field when creating flags. If it does not exist,
  // the "json" tag will be used, and if it also does not exist, the field name
  // will be downcased and converted from camel case to be dash separated.
  //
  // 3. The "short" tag on a field will be used as the shorthand flag for that
  // field. It should be a single ascii character. This will only be used if the
  // Flagger is also a PFlagger.