1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2025-03-09 00:00:02 +01:00

Remove unnecessary type conversions, second set.

This commit is contained in:
Martin Smith 2025-02-28 19:39:47 +00:00
parent 6dcd3d4d8c
commit 63888940e0
3 changed files with 9 additions and 9 deletions

View file

@ -104,7 +104,7 @@ func runRepairSnapshots(ctx context.Context, gopts GlobalOptions, opts RepairOpt
}
ok := true
var newContent restic.IDs = restic.IDs{}
var newContent = restic.IDs{}
var newSize uint64
// check all contents and remove if not available
for _, id := range node.Content {

View file

@ -18,7 +18,7 @@ import (
// UnlockCancelDelay bounds the duration how long lock cleanup operations will wait
// if the passed in context was canceled.
const UnlockCancelDelay time.Duration = 1 * time.Minute
const UnlockCancelDelay = 1 * time.Minute
// Lock represents a process locking the repository for an operation.
//

View file

@ -71,19 +71,19 @@ type FileType = backend.FileType
// in the `WriteableFileType` subset can be modified via the Repository interface.
// All other filetypes are considered internal datastructures of the Repository.
const (
PackFile FileType = backend.PackFile
KeyFile FileType = backend.KeyFile
LockFile FileType = backend.LockFile
SnapshotFile FileType = backend.SnapshotFile
IndexFile FileType = backend.IndexFile
ConfigFile FileType = backend.ConfigFile
PackFile = backend.PackFile
KeyFile = backend.KeyFile
LockFile = backend.LockFile
SnapshotFile = backend.SnapshotFile
IndexFile = backend.IndexFile
ConfigFile = backend.ConfigFile
)
// WriteableFileType defines the different data types that can be modified via SaveUnpacked or RemoveUnpacked.
type WriteableFileType backend.FileType
const (
WriteableSnapshotFile WriteableFileType = WriteableFileType(SnapshotFile)
WriteableSnapshotFile = WriteableFileType(SnapshotFile)
)
func (w *WriteableFileType) ToFileType() FileType {