diff --git a/cmd/restic/cmd_repair_snapshots.go b/cmd/restic/cmd_repair_snapshots.go index ecca7900e..95506a400 100644 --- a/cmd/restic/cmd_repair_snapshots.go +++ b/cmd/restic/cmd_repair_snapshots.go @@ -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 { diff --git a/internal/restic/lock.go b/internal/restic/lock.go index 20fa1e20e..8616ca7e7 100644 --- a/internal/restic/lock.go +++ b/internal/restic/lock.go @@ -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. // diff --git a/internal/restic/repository.go b/internal/restic/repository.go index 93e2831e0..f9e79ad75 100644 --- a/internal/restic/repository.go +++ b/internal/restic/repository.go @@ -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 {