g2a-com / g2a-com/klio

Improve get command arguments validation

Open
#12 1 comment 0 reactions 1 assignee Claimed by @michalgolab View on GitHub
enhancement good first issue
Dominant language
Go
Stars
50
Forks
13
PR merge metrics
No merged PRs in 30d

Description

Currently get command validates its parameters rather loosely. We should add at least following checks:

- [x] check if number of positional arguments is less than 2
- [x] validate command name and --alias against regexp (`/^[a-z0-9_-]+$/`?`)
- [ ] check if --version is a correct semver range
- [ ] check if --from is a correct URL

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.