From 53bd68440c5cc9f867ac7cc5fbf35c3b9d94b62c Mon Sep 17 00:00:00 2001
From: Aliaksandr Valialkin <valyala@victoriametrics.com>
Date: Thu, 2 Nov 2023 21:37:49 +0100
Subject: [PATCH] Makefile: update golangci-lint version from v1.54.2 to
 v1.55.1

See https://github.com/golangci/golangci-lint/releases/tag/v1.55.1
---
 Makefile                 | 2 +-
 lib/snapshot/snapshot.go | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 1cf97c6aae..40d833a03b 100644
--- a/Makefile
+++ b/Makefile
@@ -460,7 +460,7 @@ golangci-lint: install-golangci-lint
 	golangci-lint run
 
 install-golangci-lint:
-	which golangci-lint || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.54.2
+	which golangci-lint || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.55.1
 
 govulncheck: install-govulncheck
 	govulncheck ./...
diff --git a/lib/snapshot/snapshot.go b/lib/snapshot/snapshot.go
index 83e271d683..9af1997cac 100644
--- a/lib/snapshot/snapshot.go
+++ b/lib/snapshot/snapshot.go
@@ -51,7 +51,8 @@ func Create(createSnapshotURL string) (string, error) {
 	if snap.Status == "ok" {
 		logger.Infof("Snapshot %s created", snap.Snapshot)
 		return snap.Snapshot, nil
-	} else if snap.Status == "error" {
+	}
+	if snap.Status == "error" {
 		return "", errors.New(snap.Msg)
 	}
 	return "", fmt.Errorf("Unkown status: %v", snap.Status)
@@ -88,7 +89,8 @@ func Delete(deleteSnapshotURL string, snapshotName string) error {
 	if snap.Status == "ok" {
 		logger.Infof("Snapshot %s deleted", snapshotName)
 		return nil
-	} else if snap.Status == "error" {
+	}
+	if snap.Status == "error" {
 		return errors.New(snap.Msg)
 	}
 	return fmt.Errorf("Unkown status: %v", snap.Status)