Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expvar #35026

Closed
chaunsin opened this issue Oct 21, 2019 · 1 comment
Closed

expvar #35026

chaunsin opened this issue Oct 21, 2019 · 1 comment

Comments

@chaunsin
Copy link

What version of Go are you using (go version)?

$ go version
go version go1.13.1 windows/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
set GO111MODULE=on
set GOARCH=amd64
set GOBIN=D:\GOBIN
set GOCACHE=D:\GOCACHE
set GOENV=C:\Users\Administrator\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=D:\GOPATH
set GOPRIVATE=
set GOPROXY=https://goproxy.cn,direct
set GOROOT=D:\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=D:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=D:\GoTestPlace
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\ADMINI~1\AppData\Local\Temp\go-build233075514=/tmp/go-build -gno-record-gcc-switches

What did you do?

I want to use expvar.Get().String() to output foo instead of "foo" in case of string type。
https://play.golang.org/p/kx87CKi_oEa

What did you expect to see?

I want to use expvar.Get().String() to output foo instead of "foo" in case of string type。
https://play.golang.org/p/kx87CKi_oEa

What did you see instead?

I want to use expvar.Get().String() to output foo instead of "foo" in case of string type。

@ianlancetaylor
Copy link
Contributor

As it says at https://golang.org/pkg/expvar/#String.String, to get the unquoted string, call the Value method.

@golang golang locked and limited conversation to collaborators Oct 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants