mirror of
https://github.com/rclone/rclone.git
synced 2025-12-11 22:14:05 +01:00
cmd/rcd: Fix command docs to include command specific prefix (#6675)
This change addresses two issues with commands that re-used flags from common packages: 1) cobra.Command definitions did not include the command specific prefix in doc strings. 2) Command specific flag prefixes were added after generating command doc strings.
This commit is contained in:
committed by
Nick Craig-Wood
parent
23579e3b99
commit
0df7466d2b
15
lib/http/auth_test.go
Normal file
15
lib/http/auth_test.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package http
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestHelpPrefixAuth(t *testing.T) {
|
||||
// This test assumes template variables are placed correctly.
|
||||
const testPrefix = "server-help-test"
|
||||
helpMessage := AuthHelp(testPrefix)
|
||||
if !strings.Contains(helpMessage, testPrefix) {
|
||||
t.Fatal("flag prefix not found")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user