Skip to content

Commit bafb270

Browse files
authored
Update go linter version (#37579)
1 parent 22d1c57 commit bafb270

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

playground/backend/cmd/server/controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ func (controller *playgroundController) SaveSnippet(ctx context.Context, req *pb
491491
logger.Error("SaveSnippet(): the runner is trying to save the snippet")
492492
return nil, cerrors.InvalidArgumentError(errorTitleSaveSnippet, "The runner doesn't support snippets")
493493
}
494-
if req.Files == nil || len(req.Files) == 0 {
494+
if len(req.Files) == 0 {
495495
logger.Error("SaveSnippet(): files are empty")
496496
return nil, cerrors.InvalidArgumentError(errorTitleSaveSnippet, "Snippet must have files")
497497
}

playground/backend/cmd/server/server.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package main
1818
import (
1919
"beam.apache.org/playground/backend/internal/external_functions"
2020
"context"
21-
"fmt"
21+
"errors"
2222
"github.com/improbable-eng/grpc-web/go/grpcweb"
2323
"google.golang.org/grpc"
2424
"os"
@@ -153,7 +153,7 @@ func setupSdkCatalog(ctx context.Context, cacheService cache.Cache, db db.Databa
153153
if len(sdks) != len(sdkNames) {
154154
errMsg := "setupSdkCatalog() database doesn't have all sdks"
155155
logger.Error(errMsg)
156-
return nil, fmt.Errorf(errMsg)
156+
return nil, errors.New(errMsg)
157157
}
158158
if err = cacheService.SetSdkCatalog(ctx, sdks); err != nil {
159159
logger.Errorf("setupSdkCatalog() error during setting sdk catalog to the cache, err: %s", err.Error())

playground/backend/env_setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
17-
GO_LINTER_VERSION=1.59.1
17+
GO_LINTER_VERSION=2.9.0
1818

1919
# Install GO Linter
2020
#wget https://github.com/golangci/golangci-lint/releases/download/v1.42.1/golangci-lint-$GO_LINTER_VERSION-linux-amd64.deb

0 commit comments

Comments
 (0)