Skip to content

Commit

Permalink
Fix linter (#635)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gal Topper committed Sep 19, 2023
1 parent 989b159 commit 26bd07e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ impi:

$(GOPATH)/bin/golangci-lint:
@echo Installing golangci-lint...
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.27.0
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.49.0
cp ./bin/golangci-lint $(GOPATH)/bin/

.PHONY: lint
Expand Down
2 changes: 2 additions & 0 deletions backends/tsdb/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ func (b *Backend) newAdapter(session *frames.Session, password string, token str

// Get underlying bytes of string for read-only purposes to avoid allocating a slice.
func getBytes(str string) []byte {
// nolint: govet
hdr := *(*reflect.StringHeader)(unsafe.Pointer(&str))
// nolint: govet
return *(*[]byte)(unsafe.Pointer(&reflect.SliceHeader{
Data: hdr.Data,
Len: hdr.Len,
Expand Down

0 comments on commit 26bd07e

Please sign in to comment.