Accept and protect processing glossary files
This commit is contained in:
@@ -9,17 +9,19 @@ import (
|
||||
)
|
||||
|
||||
type processInput struct {
|
||||
Config commandkit.Supplied[string]
|
||||
Overlay commandkit.Supplied[string]
|
||||
Transcript string
|
||||
Output commandkit.Supplied[string]
|
||||
Debug commandkit.Supplied[bool]
|
||||
Overrides []ck.Override
|
||||
Config commandkit.Supplied[string]
|
||||
Overlay commandkit.Supplied[string]
|
||||
Transcript string
|
||||
Output commandkit.Supplied[string]
|
||||
Debug commandkit.Supplied[bool]
|
||||
Overrides []ck.Override
|
||||
GlossaryFiles []string
|
||||
}
|
||||
|
||||
func processCommand() commandkit.Command {
|
||||
stringValue := func(s string) (string, error) { return s, nil }
|
||||
flags := []commandkit.Flag[processInput]{
|
||||
commandkit.RepeatFlag(commandkit.FlagMeta{Name: "glossary-file", Usage: "Runtime glossary file (repeatable)."}, nil, stringValue, func(in *processInput, v commandkit.Supplied[[]string]) { in.GlossaryFiles = v.Value }),
|
||||
commandkit.ValueFlag(commandkit.FlagMeta{Name: "config", Usage: "Application configuration file."}, (*string)(nil), stringValue, func(in *processInput, v commandkit.Supplied[string]) { in.Config = v }),
|
||||
commandkit.ValueFlag(commandkit.FlagMeta{Name: "overlay", Usage: "Configuration overlay."}, (*string)(nil), stringValue, func(in *processInput, v commandkit.Supplied[string]) { in.Overlay = v }),
|
||||
commandkit.ValueFlag(commandkit.FlagMeta{Name: "output", Usage: "Transcript output file."}, (*string)(nil), stringValue, func(in *processInput, v commandkit.Supplied[string]) { in.Output = v }),
|
||||
|
||||
Reference in New Issue
Block a user