coder / coder/serpent

Enforce usage as per Use string

Open
#4 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
21
Forks
6
PR merge metrics
No merged PRs in 30d

Description

E.g., in coder/coder we have code like:

```go
cmd := &serpent.Cmd{
Use: "create [name]",
Short: "DEPRECATED: Create a template from the current directory or as specified by flag",
Middleware: serpent.Chain(
serpent.RequireRangeArgs(0, 1),
r.InitClient(client),
),
```

where the `serpent.RequireRangeArgs(0, 1)` is arguably redundant with the Use. Also, we could provide an error message by just parsing Use.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.