You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
git-bundle-web-server: move flags definition to common location
Move the definition of flags used by 'git-bundle-web-server' & custom flag
validation, to a more openly-accessible location. Specifically, add the
function 'WebServerFlags()' to a new file 'common-args.go' (in a new command
'utils' library). This function returns two values: a 'flag.FlagSet'
containing the args that are used by 'git-bundle-web-server', and a function
that takes no arguments and runs validation checks on the flag values after
arg parsing.
The goal of this change is to avoid duplicating these arg definitions and
validations when 'git-bundle-server web-server start' eventually uses those
options to configure the server daemon. It also sets up a pattern we can use
for future commands that need to share options.
Additionally, because the access pattern for flag values in a parsed
'flag.FlagSet' is a bit weird, add another helper function to
'common-args.go' to contain the logic for getting those values.
Signed-off-by: Victoria Dye <[email protected]>
0 commit comments