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

x/text/currency: add support for integer #32769

Open
YunxiangHuang opened this issue Jun 25, 2019 · 2 comments
Open

x/text/currency: add support for integer #32769

YunxiangHuang opened this issue Jun 25, 2019 · 2 comments

Comments

@YunxiangHuang
Copy link

@YunxiangHuang YunxiangHuang commented Jun 25, 2019

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

$ go version
go version go1.12.6 darwin/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

GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/yunxiang.huang/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/yunxiang.huang/Work/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.12.6/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.12.6/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/nz/kfm5t8n50dq8gz79ln3jfchc0000gn/T/go-build553255337=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

package main

import (
	"fmt"

	"golang.org/x/text/currency"
)

func main() {
	cur := currency.MustParseISO("CNY")
	fmt.Println(currency.NarrowSymbol(cur.Amount(0)))
	fmt.Println(currency.Symbol(cur.Amount(0)))
}

What did you expect to see?

¥0.00
CN¥ 0.00

What did you see instead?

¥ %!f(int=00)
CN¥ %!f(int=00)
@gopherbot gopherbot added this to the Unreleased milestone Jun 25, 2019
@andybons
Copy link
Member

@andybons andybons commented Jun 25, 2019

@rhnvrm
Copy link
Contributor

@rhnvrm rhnvrm commented Jun 28, 2019

@andybons @mpvl @YunxiangHuang - I'd be happy to work on this issue

@ALTree ALTree changed the title x/text/currency: add support for integer. x/text/currency: add support for integer Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants