Skip to content

Commit

Permalink
fix spacing (#1687)
Browse files Browse the repository at this point in the history
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
bathina2 and mergify[bot] committed Oct 18, 2022
1 parent 7d81e1f commit 7aef8de
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions pkg/kube/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,9 @@ func checkNodesStatus(p *v1.Pod, cli kubernetes.Interface) error {
}

// checkPVCAndPVStatus does the following:
// - if PVC is present then check the status of PVC
// - if PVC is pending then check if the PV status is VolumeFailed return error if so. if not then wait for timeout.
// - if PVC not present then wait for timeout
// - if PVC is present then check the status of PVC
// - if PVC is pending then check if the PV status is VolumeFailed return error if so. if not then wait for timeout.
// - if PVC not present then wait for timeout
func getVolStatus(ctx context.Context, p *v1.Pod, cli kubernetes.Interface, namespace string) error {
for _, vol := range p.Spec.Volumes {
if err := checkPVCAndPVStatus(ctx, vol, p, cli, namespace); err != nil {
Expand All @@ -247,9 +247,9 @@ func getVolStatus(ctx context.Context, p *v1.Pod, cli kubernetes.Interface, name
}

// checkPVCAndPVStatus does the following:
// - if PVC is present then check the status of PVC
// - if PVC is pending then check if the PV status is VolumeFailed return error if so. if not then wait for timeout.
// - if PVC not present then wait for timeout
// - if PVC is present then check the status of PVC
// - if PVC is pending then check if the PV status is VolumeFailed return error if so. if not then wait for timeout.
// - if PVC not present then wait for timeout
func checkPVCAndPVStatus(ctx context.Context, vol v1.Volume, p *v1.Pod, cli kubernetes.Interface, namespace string) error {
if vol.VolumeSource.PersistentVolumeClaim == nil {
// wait for timeout
Expand Down
4 changes: 2 additions & 2 deletions pkg/restic/restic.go
Original file line number Diff line number Diff line change
Expand Up @@ -470,9 +470,9 @@ func SnapshotIDsFromSnapshotCommand(output string) ([]string, error) {

// SpaceFreedFromPruneLog gets the space freed from the prune log output
// For reference, here is the logging command from restic codebase:
// Verbosef("will delete %d packs and rewrite %d packs, this frees %s\n",
//
// len(removePacks), len(rewritePacks), formatBytes(uint64(removeBytes)))
// Verbosef("will delete %d packs and rewrite %d packs, this frees %s\n",
// len(removePacks), len(rewritePacks), formatBytes(uint64(removeBytes)))
func SpaceFreedFromPruneLog(output string) string {
var spaceFreed string
logs := regexp.MustCompile("[\n]").Split(output, -1)
Expand Down

0 comments on commit 7aef8de

Please sign in to comment.