Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.

Commit fce86f1

Browse files
committed
backup: fix typo
1 parent 2dc177c commit fce86f1

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

pkg/backup/backup_manager.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@ func (bm *BackupManager) SaveSnap(ctx context.Context, s3Path string, now time.T
8080
return rev, resp.Version, nil
8181
}
8282

83-
// EnsureMaxbackup to ensure the number of snapshot is under maxcount
83+
// EnsureMaxBackup to ensure the number of snapshot is under maxcount
8484
// if the number of snapshot exceeded than maxcount, delete oldest snapshot
85-
func (bm *BackupManager) EnsureMaxbackup(ctx context.Context, s3Path string, maxCount int) error {
85+
func (bm *BackupManager) EnsureMaxBackup(ctx context.Context, s3Path string, maxCount int) error {
8686

8787
savedSnapShots, err := bm.bw.List(ctx, s3Path)
8888
if err != nil {
89-
return fmt.Errorf("failed to get exisiting snapashots: %v", err)
89+
return fmt.Errorf("failed to get exisiting snapshots: %v", err)
9090
}
9191
sort.Sort(sort.Reverse(sort.StringSlice(savedSnapShots)))
9292
for i, snapshotPath := range savedSnapShots {

pkg/backup/writer/writer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ type Writer interface {
2424
// Write writes a backup file to the given path and returns size of written file.
2525
Write(ctx context.Context, path string, r io.Reader) (int64, error)
2626

27-
// List a backup files
27+
// List backup files
2828
List(ctx context.Context, basePath string) ([]string, error)
2929

3030
// Delete a backup file

pkg/controller/backup-operator/sync.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ func validate(spec *api.BackupSpec) error {
297297
}
298298
if spec.BackupPolicy != nil {
299299
if spec.BackupPolicy.BackupIntervalInSecond < 0 {
300-
return errors.New("spec.backupPoloicy.backupIntervalInSecond should not be lower than 0")
300+
return errors.New("spec.backupPolicy.backupIntervalInSecond should not be lower than 0")
301301
}
302302
if spec.BackupPolicy.MaxBackups < 0 {
303303
return errors.New("spec.backupPolicy.MaxBackups should not be lower than 0")

0 commit comments

Comments
 (0)