-
Notifications
You must be signed in to change notification settings - Fork 838
Description
What version of Go, VS Code & VS Code Go extension are you using?
Version Information
-
Run
go version
to get version of Go from the VS Code integrated terminal.- go version go1.21.6 linux/amd64
-
Run
gopls -v version
to get version of Gopls from the VS Code integrated terminal.- golang.org/x/tools/gopls v0.14.2
-
Run
code -v
orcode-insiders -v
to get version of VS Code or VS Code Insiders.- 1.86.0
-
Check your installed extensions to get the version of the VS Code Go extension
- v0.40.3
-
Run Ctrl+Shift+P (Cmd+Shift+P on Mac OS) >
Go: Locate Configured Go Tools
command.- Checking configured tools....
GOBIN: undefined
toolsGopath:
gopath: /home/anirudh-g/go
GOROOT: /snap/go/10489
PATH: /snap/go/10489/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin
go: /snap/go/current/bin/go: go version go1.21.6 linux/amd64
gopls: /home/anirudh-g/go/bin/gopls (version: v0.14.2 built with go: go1.21.4)
gotests: not installed
gomodifytags: not installed
impl: not installed
goplay: not installed
dlv: /home/anirudh-g/go/bin/dlv (version: v1.21.0 built with go: go1.21.0)
staticcheck: /home/anirudh-g/go/bin/staticcheck (version: v0.4.5 built with go: go1.21.0) - Checking configured tools....
go env
Workspace Folder (playground): /home/anirudh-g/Documents/programming/golang/playground
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/anirudh-g/.cache/go-build'
GOENV='/home/anirudh-g/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/anirudh-g/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/anirudh-g/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/snap/go/10489'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/snap/go/10489/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.21.6'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/home/anirudh-g/Documents/programming/golang/playground/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build2453955022=/tmp/go-build -gno-record-gcc-switches'
Share the Go related settings you have added/edited
"go.toolsManagement.autoUpdate": true,
"go.alternateTools": {
"go": "/snap/go/current/bin/go"
},
Describe the bug
If a string that contains the ]
character is converted to a []byte
, both syntax highlighting and intellisense stop working from that line onwards. All subsequent lines of code have incorrect syntax highlighting, and intellisense does not work on those lines of code. This only happens on VSCode version 1.86.0
Steps to reproduce the behavior:
- Take a project with multiple lines of correctly syntax highlighted code
- Add the line
var myByteArray []byte = []byte("]")
somewhere in the middle - From that line onward, syntax highlighting and Intellisense ceases to work