rc: implement options/blocks,get,set and register options

This commit is contained in:
Nick Craig-Wood
2018-10-27 23:58:18 +01:00
parent 0bfa9811f7
commit b972dcb0ae
7 changed files with 106 additions and 0 deletions

View File

@@ -15,6 +15,7 @@ var (
// AddFlags adds the remote control flags to the flagSet
func AddFlags(flagSet *pflag.FlagSet) {
rc.AddOption("rc", &Opt)
flags.BoolVarP(flagSet, &Opt.Enabled, "rc", "", false, "Enable the remote control server.")
flags.StringVarP(flagSet, &Opt.Files, "rc-files", "", "", "Serve these files on the HTTP server.")
httpflags.AddFlagsPrefix(flagSet, "rc-", &Opt.HTTPOptions)