Support for required parameter/argument
- Dominant language
- Zig
- Stars
- 1.6k
- Forks
- 99
- Avg merge
- 3h 53m
- Merged PRs (30d)
- 1
Description
Hi there,
Great job with this library so far!
I'm missing `required` parameter functionality. Would it make sense for you to add it ?
I see that we could (in rough words) extend this function
```
pub fn Param(comptime Id: type) type {
return struct {
id: Id,
names: Names = Names{},
takes_value: Values = .none,
};
}
```
with a field `.required: bool = false` and extend Errors with something like this:
```
pub const Error = error{
MissingValue,
InvalidArgument,
DoesntTakeValue,
MissingRequiredParam
};
```
I think I can prepare PR with such change.
This is only proposition of changes. What do you think ?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.