1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
From: erebion <erebion@erebion.eu>
Date: Wed, 30 Apr 2025 15:26:02 +0200
Subject: Fix output of command to match names of binary/package (#1104446)
---
cmd/rest-server/main.go | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/cmd/rest-server/main.go b/cmd/rest-server/main.go
index 451d093..dff7623 100644
--- a/cmd/rest-server/main.go
+++ b/cmd/rest-server/main.go
@@ -32,17 +32,17 @@ type restServerApp struct {
func newRestServerApp() *restServerApp {
rv := &restServerApp{
CmdRoot: &cobra.Command{
- Use: "rest-server",
+ Use: "restic-rest-server",
Short: "Run a REST server for use with restic",
SilenceErrors: true,
SilenceUsage: true,
Args: func(cmd *cobra.Command, args []string) error {
if len(args) != 0 {
- return fmt.Errorf("rest-server expects no arguments - unknown argument: %s", args[0])
+ return fmt.Errorf("restic-rest-server expects no arguments - unknown argument: %s", args[0])
}
return nil
},
- Version: fmt.Sprintf("rest-server %s compiled with %v on %v/%v\n", version, runtime.Version(), runtime.GOOS, runtime.GOARCH),
+ Version: fmt.Sprintf("restic-rest-server %s compiled with %v on %v/%v\n", version, runtime.Version(), runtime.GOOS, runtime.GOARCH),
},
Server: restserver.Server{
Path: filepath.Join(os.TempDir(), "restic"),
@@ -64,7 +64,7 @@ func newRestServerApp() *restServerApp {
flags.BoolVar(&rv.Server.NoAuth, "no-auth", rv.Server.NoAuth, "disable .htpasswd authentication")
flags.StringVar(&rv.Server.HtpasswdPath, "htpasswd-file", rv.Server.HtpasswdPath, "location of .htpasswd file (default: \"<data directory>/.htpasswd)\"")
flags.BoolVar(&rv.Server.NoVerifyUpload, "no-verify-upload", rv.Server.NoVerifyUpload,
- "do not verify the integrity of uploaded data. DO NOT enable unless the rest-server runs on a very low-power device")
+ "do not verify the integrity of uploaded data. DO NOT enable unless the restic-rest-server runs on a very low-power device")
flags.BoolVar(&rv.Server.AppendOnly, "append-only", rv.Server.AppendOnly, "enable append only mode")
flags.BoolVar(&rv.Server.PrivateRepos, "private-repos", rv.Server.PrivateRepos, "users can only access their private repo")
flags.BoolVar(&rv.Server.Prometheus, "prometheus", rv.Server.Prometheus, "enable Prometheus metrics")
|