flags : Flag interface instead of generic, allowing us to move the reflection out into a field expansion func only

This commit is contained in:
bth 2026-01-26 18:48:55 -08:00
commit b8156931fd
8 changed files with 167 additions and 152 deletions

View file

@ -25,14 +25,14 @@ var fileRegexp *regexp.Regexp = regexp.MustCompile(FILE_REGEXP)
type options struct {
Descriptor flags.Arg
Tags flags.Arg
Help flags.Flag[bool]
Help flags.Bool
}
func initOpts() options {
return options{
flags.Arg{"", "midfix file descriptor"},
flags.Arg{"", "tags to add to new file"},
flags.Flag[bool]{"--help", "-h", false, "show help"},
flags.Bool{"--help", "-h", false, "show help"},
}
}