add support to actually specify prompt

This commit is contained in:
Ivar Fatland
2026-05-12 17:48:49 +02:00
parent 1d38507fb7
commit 2758ff5445
18 changed files with 2701 additions and 1 deletions
+21
View File
@@ -0,0 +1,21 @@
package arg
var registrations []interface{}
// Register adds a struct that will be added to the command line arguments parsed
// by any call to arg.Parse or arg.MustParse
//
// This allows you to have command line arguments defined per-package
//
// package foo
//
// var args struct {
// CacheSize int `arg:"--foo-cache-size"`
// }
//
// func init() {
// arg.Register(&args)
// }
func Register(dest any) {
registrations = append(registrations, dest)
}