ArgParser.HandlerFnΒΆ

HandlerFn :: *fn (parser: Parser, args: []string, ctx: *Ctx) (_0: s32, _1: Error)

Argument parser callback function type. In context of add this callback function provides current parser, rest of the input argument slice starting from currently captured argument name and custom argument context ctx. Expected return of such function is count of parsed arguments from args input (at least one for successfully parsed argument with no additional input) and status.

See also: add

Declared in: arg_parser.bl