Files
dotfiles/raymenu/vendor/github.com/alexflint/go-arg/register.go
T
2026-05-12 17:48:49 +02:00

22 lines
458 B
Go

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)
}