You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does this issue reproduce with the latest release?
Yes, it does
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
set GO111MODULE=auto
set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOVCS=
set GOVERSION=go1.20
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=0
set GOMOD=
set GOWORK=
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0
What did you do?
I tried to declare a string variable using backquote syntax. The string value should include an escaped backquote as showing in the code snippet below:
funcmain() {
fmt.Println(`hello\``)
}
What did you expect to see?
Output:
hello`
What did you see instead?
Output:
./prog.go:8:22: stringnotterminated
./prog.go:8:22: syntax error: unexpectedliteral `)
}
in argument list; possibly missing comma or )
The text was updated successfully, but these errors were encountered:
working as intended. raw strings literals are defined to have no escapes.
Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, it does
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I tried to declare a string variable using backquote syntax. The string value should include an escaped backquote as showing in the code snippet below:
What did you expect to see?
Output:
hello`
What did you see instead?
Output:
The text was updated successfully, but these errors were encountered: