From a6d66cc7ecf202986fef4d7e986490ec7217a749 Mon Sep 17 00:00:00 2001 From: Colin Adler Date: Wed, 10 Jul 2024 14:50:38 -0500 Subject: [PATCH] chore: ensure correct version of golangci-lint is run in ci (#13869) --- Makefile | 3 +-- apiversion/apiversion.go | 2 +- enterprise/coderd/workspaceproxy.go | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 0cd253efa6..664e1287ff 100644 --- a/Makefile +++ b/Makefile @@ -448,8 +448,7 @@ lint/ts: lint/go: ./scripts/check_enterprise_imports.sh linter_ver=$(shell egrep -o 'GOLANGCI_LINT_VERSION=\S+' dogfood/Dockerfile | cut -d '=' -f 2) - go install github.com/golangci/golangci-lint/cmd/golangci-lint@v$$linter_ver - golangci-lint run + go run github.com/golangci/golangci-lint/cmd/golangci-lint@v$$linter_ver run .PHONY: lint/go lint/examples: diff --git a/apiversion/apiversion.go b/apiversion/apiversion.go index 225fe01785..349b5c9fec 100644 --- a/apiversion/apiversion.go +++ b/apiversion/apiversion.go @@ -26,7 +26,7 @@ type APIVersion struct { } func (v *APIVersion) WithBackwardCompat(majs ...int) *APIVersion { - v.additionalMajors = append(v.additionalMajors, majs[:]...) + v.additionalMajors = append(v.additionalMajors, majs...) return v } diff --git a/enterprise/coderd/workspaceproxy.go b/enterprise/coderd/workspaceproxy.go index 22bd360ccb..aa431c5fe2 100644 --- a/enterprise/coderd/workspaceproxy.go +++ b/enterprise/coderd/workspaceproxy.go @@ -350,7 +350,7 @@ func (api *API) postWorkspaceProxy(rw http.ResponseWriter, r *http.Request) { Name: req.Name, DisplayName: req.DisplayName, Icon: req.Icon, - TokenHashedSecret: hashedSecret[:], + TokenHashedSecret: hashedSecret, // Enabled by default, but will be disabled on register if the proxy has // it disabled. DerpEnabled: true,