From d8c00b9726ae3bb5ab849e486bc53e856e642f94 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Mon, 3 Oct 2022 14:50:21 +0200 Subject: [PATCH] add comment --- cmd/restic/find.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/restic/find.go b/cmd/restic/find.go index c5fb6fa7f..7b488c7aa 100644 --- a/cmd/restic/find.go +++ b/cmd/restic/find.go @@ -15,6 +15,7 @@ type snapshotFilterOptions struct { } // initMultiSnapshotFilterOptions is used for commands that work on multiple snapshots +// MUST be combined with restic.FindFilteredSnapshots or FindFilteredSnapshots func initMultiSnapshotFilterOptions(flags *pflag.FlagSet, options *snapshotFilterOptions, addHostShorthand bool) { hostShorthand := "H" if !addHostShorthand { @@ -26,6 +27,7 @@ func initMultiSnapshotFilterOptions(flags *pflag.FlagSet, options *snapshotFilte } // initSingleSnapshotFilterOptions is used for commands that work on a single snapshot +// MUST be combined with restic.FindFilteredSnapshot func initSingleSnapshotFilterOptions(flags *pflag.FlagSet, options *snapshotFilterOptions) { flags.StringArrayVarP(&options.Hosts, "host", "H", nil, "only consider snapshots for this `host`, when snapshot ID \"latest\" is given (can be specified multiple times)") flags.Var(&options.Tags, "tag", "only consider snapshots including `tag[,tag,...]`, when snapshot ID \"latest\" is given (can be specified multiple times)")