docs: group the global flags and make them appear on command and flags pages
This adds an additional parameter to the creation of each flag. This specifies one or more flag groups. This **must** be set for global flags and **must not** be set for local flags. This causes flags.md to be built with sections to aid comprehension and it causes the documentation pages for each command (and the `--help`) to be built showing the flags groups as specified in the `groups` annotation on the command. See: https://forum.rclone.org/t/make-docs-for-mortals-not-only-rclone-gurus/39476/
This commit is contained in:
parent
a1d6bbd31f
commit
bff702a6f1
69 changed files with 685 additions and 454 deletions
|
@ -13,9 +13,9 @@ import (
|
|||
func platformFlags(flagSet *pflag.FlagSet) {
|
||||
Opt.Umask = unix.Umask(0) // read the umask
|
||||
unix.Umask(Opt.Umask) // set it back to what it was
|
||||
flags.IntVarP(flagSet, &Opt.Umask, "umask", "", Opt.Umask, "Override the permission bits set by the filesystem (not supported on Windows)")
|
||||
flags.IntVarP(flagSet, &Opt.Umask, "umask", "", Opt.Umask, "Override the permission bits set by the filesystem (not supported on Windows)", "VFS")
|
||||
Opt.UID = uint32(unix.Geteuid())
|
||||
Opt.GID = uint32(unix.Getegid())
|
||||
flags.Uint32VarP(flagSet, &Opt.UID, "uid", "", Opt.UID, "Override the uid field set by the filesystem (not supported on Windows)")
|
||||
flags.Uint32VarP(flagSet, &Opt.GID, "gid", "", Opt.GID, "Override the gid field set by the filesystem (not supported on Windows)")
|
||||
flags.Uint32VarP(flagSet, &Opt.UID, "uid", "", Opt.UID, "Override the uid field set by the filesystem (not supported on Windows)", "VFS")
|
||||
flags.Uint32VarP(flagSet, &Opt.GID, "gid", "", Opt.GID, "Override the gid field set by the filesystem (not supported on Windows)", "VFS")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue