thatisuday / clapper Goto Github PK
View Code? Open in Web Editor NEWA better command-line arguments parser library for Go.
Home Page: https://pkg.go.dev/github.com/thatisuday/clapper
License: MIT License
A better command-line arguments parser library for Go.
Home Page: https://pkg.go.dev/github.com/thatisuday/clapper
License: MIT License
While they are used in different locations, it's not clear that there's a semantic difference. I'd like to clean this up and merge the two errors.
You mention that you'd accept a PR for combined boolean short flags (-a -b
~= -ab
). What is your appetite for these features:
time.Time
, the value is returned as a time.Time
). Generics may keep this addition small (LOC)infoCommand.AddArg("subjects...", ["chemistry", "physics", "algorithms")
command, err := registry.Parse([]string{"--subjects", "poetry"})
// err => InvalidChoiceError{Arg: "subjects", Value: "poetry"}
AddReqFlag()
.My priority preference are in that order: combined short bool flags, types, and choices. Mandatory flags, I'm not strongly opinionated about, as it's easily enough handled outside the library. But I think the first three -- with Go's new support for generics -- would be relatively minor and easily backwards-compatible.
If you're open to PRs, I'll have a crack at all of them; if you have an opinion on how they look, I'd rather discuss up front than have to change the design at merge time. The biggest impact would be a dependency on Go 1.19+.
Combined short flags is straightforward, API-wise. Type assertions and choices, I think can be added without changing the current API at all.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.