From a7c85ea3c63a6a37f5d31ce161305177784fe23a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lie=20DELHAIE?= Date: Sun, 17 Aug 2025 01:12:31 +0200 Subject: [PATCH] fix name --- cmd/cli/commands/apply/apply.go | 12 ++++++------ cmd/cli/main.go | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/cli/commands/apply/apply.go b/cmd/cli/commands/apply/apply.go index c0c3de9..b462ad0 100644 --- a/cmd/cli/commands/apply/apply.go +++ b/cmd/cli/commands/apply/apply.go @@ -11,24 +11,24 @@ import ( ) type ( - ListCmd struct { + ApplyCmd struct { Service *data.Service } ) -func (*ListCmd) Name() string { return "apply" } -func (*ListCmd) Synopsis() string { return "apply a backup" } -func (*ListCmd) Usage() string { +func (*ApplyCmd) Name() string { return "apply" } +func (*ApplyCmd) Synopsis() string { return "apply a backup" } +func (*ApplyCmd) Usage() string { return `Usage: cloudsave apply [BACKUP_ID] Apply a backup ` } -func (p *ListCmd) SetFlags(f *flag.FlagSet) { +func (p *ApplyCmd) SetFlags(f *flag.FlagSet) { } -func (p *ListCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus { +func (p *ApplyCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus { if f.NArg() < 1 { fmt.Fprintln(os.Stderr, "error: missing game ID and/or backup uuid") return subcommands.ExitUsageError diff --git a/cmd/cli/main.go b/cmd/cli/main.go index 255e06d..b8c6222 100644 --- a/cmd/cli/main.go +++ b/cmd/cli/main.go @@ -51,7 +51,7 @@ func main() { subcommands.Register(&remove.RemoveCmd{Service: s}, "management") subcommands.Register(&show.ShowCmd{Service: s}, "management") - subcommands.Register(&apply.ListCmd{Service: s}, "restore") + subcommands.Register(&apply.ApplyCmd{Service: s}, "restore") subcommands.Register(&remote.RemoteCmd{Service: s}, "remote") subcommands.Register(&sync.SyncCmd{Service: s}, "remote")