From 6f9513d88c2558dff1b11e2436d8144d719d1e09 Mon Sep 17 00:00:00 2001 From: dropbigfish Date: Sun, 1 Sep 2024 00:54:39 +0800 Subject: [PATCH] chore: fix some function names Signed-off-by: dropbigfish --- cmd/restic/cmd_snapshots.go | 2 +- cmd/restic/progress.go | 2 +- internal/fs/sd_windows.go | 2 +- internal/fs/vss_windows.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/restic/cmd_snapshots.go b/cmd/restic/cmd_snapshots.go index 42677918f..466f536e0 100644 --- a/cmd/restic/cmd_snapshots.go +++ b/cmd/restic/cmd_snapshots.go @@ -329,7 +329,7 @@ type SnapshotGroup struct { Snapshots []Snapshot `json:"snapshots"` } -// printSnapshotsJSON writes the JSON representation of list to stdout. +// printSnapshotGroupJSON writes the JSON representation of list to stdout. func printSnapshotGroupJSON(stdout io.Writer, snGroups map[string]restic.Snapshots, grouped bool) error { if grouped { snapshotGroups := []SnapshotGroup{} diff --git a/cmd/restic/progress.go b/cmd/restic/progress.go index d9ff634ce..afd5d027f 100644 --- a/cmd/restic/progress.go +++ b/cmd/restic/progress.go @@ -29,7 +29,7 @@ func calculateProgressInterval(show bool, json bool) time.Duration { return interval } -// newTerminalProgressMax returns a progress.Counter that prints to stdout or terminal if provided. +// newGenericProgressMax returns a progress.Counter that prints to stdout or terminal if provided. func newGenericProgressMax(show bool, max uint64, description string, print func(status string, final bool)) *progress.Counter { if !show { return nil diff --git a/internal/fs/sd_windows.go b/internal/fs/sd_windows.go index 0004f1809..d085e67ec 100644 --- a/internal/fs/sd_windows.go +++ b/internal/fs/sd_windows.go @@ -156,7 +156,7 @@ func enableBackupPrivilege() { } } -// enableBackupPrivilege enables privilege for restoring security descriptors +// enableRestorePrivilege enables privilege for restoring security descriptors func enableRestorePrivilege() { err := enableProcessPrivileges([]string{SeRestorePrivilege, SeSecurityPrivilege, SeTakeOwnershipPrivilege}) if err != nil { diff --git a/internal/fs/vss_windows.go b/internal/fs/vss_windows.go index 0b51b00f3..940e1b36a 100644 --- a/internal/fs/vss_windows.go +++ b/internal/fs/vss_windows.go @@ -784,7 +784,7 @@ func (p *VssSnapshot) GetSnapshotDeviceObject() string { return p.snapshotDeviceObject } -// initializeCOMInterface initialize an instance of the VSS COM api +// initializeVssCOMInterface initialize an instance of the VSS COM api func initializeVssCOMInterface() (*ole.IUnknown, error) { vssInstance, err := loadIVssBackupComponentsConstructor() if err != nil {