mirror of
https://github.com/rclone/rclone.git
synced 2025-12-16 00:04:40 +00:00
gendocs: refactor and add logging of skipped command docs
This commit is contained in:
@@ -170,17 +170,18 @@ rclone.org website.`,
|
|||||||
name := filepath.Base(path)
|
name := filepath.Base(path)
|
||||||
cmd, ok := commands[name]
|
cmd, ok := commands[name]
|
||||||
if !ok {
|
if !ok {
|
||||||
switch runtime.GOOS {
|
|
||||||
case "darwin":
|
|
||||||
if name == "rclone_mount.md" {
|
|
||||||
return nil // won't exist without -tags cmount
|
|
||||||
}
|
|
||||||
case "windows":
|
|
||||||
switch name {
|
switch name {
|
||||||
case "rclone_mount.md":
|
case "rclone_mount.md":
|
||||||
return nil // won't exist without -tags cmount
|
switch runtime.GOOS {
|
||||||
|
case "darwin", "windows":
|
||||||
|
fs.Logf(nil, "Skipping docs for command not available without the cmount build tag: %v", name)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
case "rclone_nfsmount.md", "rclone_serve_nfs.md":
|
case "rclone_nfsmount.md", "rclone_serve_nfs.md":
|
||||||
return nil // not supported
|
switch runtime.GOOS {
|
||||||
|
case "windows":
|
||||||
|
fs.Logf(nil, "Skipping docs for command not supported on %v: %v", runtime.GOOS, name)
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return fmt.Errorf("didn't find command for %q", name)
|
return fmt.Errorf("didn't find command for %q", name)
|
||||||
|
|||||||
Reference in New Issue
Block a user